home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Reference / the MacTech Archives / MacTech Vol 11-1995 < prev    next >
MacBinary  |  1996-04-25  |  10.6 MB  |  [Guid/DanR]

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

This file was processed as: MacBinary (archive/macBinary).

You can browse this item here: MacTech Vol 11-1995

ConfidenceProgramDetectionMatch TypeSupport
10% dexvert MacBinary (archive/macBinary) fallback Supported
100% file MacBinary II, inited, Thu Apr 4 07:29:25 1996, modified Wed Apr 24 22:04:35 1996, creator 'DanR', type 'Guid', 4440956 bytes "MacTech Vol 11-1995" , at 0x43c3fc 6693970 bytes resource default (weak)
99% file data default
100% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[Guid]
macFileCreator[DanR]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 13 4d 61 63 54 65 63 | 68 20 56 6f 6c 20 31 31 |..MacTec|h Vol 11|
|00000010| 2d 31 39 39 35 00 00 00 | 00 00 00 00 00 00 00 00 |-1995...|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 47 75 69 64 44 61 6e | 52 01 00 00 00 00 00 00 |.GuidDan|R.......|
|00000050| 00 00 00 00 43 c3 7c 00 | 66 24 52 ad 89 71 25 ad |....C.|.|f$R..q%.|
|00000060| a4 8e 33 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |..3.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 d2 c7 00 00 |........|........|
|00000080| 4e 47 4d 43 00 5d 44 52 | 00 00 00 00 07 ff ff 0c |NGMC.]DR|........|
|00000090| 50 72 6f 67 72 61 70 68 | 20 32 2e 30 ff ff 12 50 |Prograph| 2.0...P|
|000000a0| 72 6f 67 72 61 70 68 20 | 50 72 69 6d 69 74 69 76 |rograph |Primitiv|
|000000b0| 65 ff ff 0c 50 72 6f 67 | 72 61 70 68 20 32 2e 35 |e...Prog|raph 2.5|
|000000c0| ff ff 15 50 72 6f 67 72 | 61 70 68 20 43 50 58 20 |...Progr|aph CPX |
|000000d0| 54 75 74 6f 72 69 61 6c | 00 24 0d 50 72 6f 67 72 |Tutorial|.$.Progr|
|000000e0| 61 70 68 20 55 6e 64 6f | 00 33 13 4d 61 63 41 70 |aph Undo|.3.MacAp|
|000000f0| 70 20 61 6e 64 20 50 72 | 6f 67 72 61 70 68 00 54 |p and Pr|ograph.T|
|00000100| 0c 50 72 6f 67 72 61 70 | 68 20 41 70 70 15 43 6f |.Prograp|h App.Co|
|00000110| 6d 6d 61 6e 64 73 20 61 | 6e 64 20 55 6e 64 6f 20 |mmands a|nd Undo |
|00000120| 43 50 58 00 01 24 00 00 | 00 0c 00 09 00 12 c4 56 |CPX..$..|.......V|
|00000130| 6f 6c 75 6d 65 20 4e 75 | 6d 62 65 72 3a 97 31 31 |olume Nu|mber:.11|
|00000140| 00 00 00 18 00 09 00 10 | c4 49 73 73 75 65 20 4e |........|.Issue N|
|00000150| 75 6d 62 65 72 3a a2 31 | 00 00 00 24 00 09 00 1f |umber:.1|...$....|
|00000160| c4 43 6f 6c 75 6d 6e 20 | 54 61 67 3a b0 56 69 73 |.Column |Tag:.Vis|
|00000170| 75 61 6c 20 50 72 6f 67 | 72 61 6d 6d 69 6e 67 00 |ual Prog|ramming.|
|00000180| 00 00 00 7a 00 09 00 2b | c5 43 6f 6d 6d 61 6e 64 |...z...+|.Command|
|00000190| 73 20 61 6e 64 20 55 6e | 64 6f 20 69 6e 20 50 72 |s and Un|do in Pr|
|000001a0| 6f 67 72 61 70 68 20 43 | 50 58 80 01 87 c4 f0 00 |ograph C|PX......|
|000001b0| 80 00 20 00 00 00 00 92 | 00 09 00 28 c4 43 6f 6d |.. .....|...(.Com|
|000001c0| 6d 61 6e 64 20 6f 62 6a | 65 63 74 73 20 74 6f 20 |mand obj|ects to |
|000001d0| 64 6f 2c 20 72 65 64 6f | 2c 20 61 6e 64 20 75 6e |do, redo|, and un|
|000001e0| 64 6f ff c9 00 00 00 a6 | 00 09 00 28 c6 42 79 20 |do......|...(.By |
|000001f0| 4b 75 72 74 20 53 63 68 | 6d 75 63 6b 65 72 2c 20 |Kurt Sch|mucker, |
|00000200| 41 70 70 6c 65 20 43 6f | 6d 70 75 74 65 72 2c 20 |Apple Co|mputer, |
|00000210| 49 6e 63 2e 00 00 00 c9 | 00 09 00 55 c6 f0 00 81 |Inc.....|...U....|
|00000220| 00 12 20 4e 6f 74 65 3a | 20 20 53 6f 75 72 63 65 |.. Note:| Source|
|00000230| 20 63 6f 64 65 20 66 69 | 6c 65 73 20 61 63 63 6f | code fi|les acco|
|00000240| 6d 70 61 6e 79 69 6e 67 | 20 61 72 74 69 63 6c 65 |mpanying| article|
|00000250| 20 61 72 65 20 6c 6f 63 | 61 74 65 64 20 6f 6e 20 | are loc|ated on |
|00000260| 4d 61 63 54 65 63 68 20 | 43 44 2d 52 4f 4d 20 6f |MacTech |CD-ROM o|
|00000270| 72 00 00 00 00 d5 00 09 | 00 13 c6 73 6f 75 72 63 |r.......|...sourc|
|00000280| 65 20 63 6f 64 65 20 64 | 69 73 6b 73 2e 00 00 00 |e code d|isks....|
|00000290| 00 e9 00 09 00 56 c2 57 | 68 65 6e 20 74 68 65 20 |.....V.W|hen the |
|000002a0| 4d 61 63 69 6e 74 6f 73 | 68 20 66 69 72 73 74 20 |Macintos|h first |
|000002b0| 63 61 6d 65 20 6f 75 74 | 20 69 6e 20 ff d4 38 34 |came out| in ..84|
|000002c0| 2c 20 74 68 65 72 65 20 | 77 61 73 20 6f 6e 65 20 |, there |was one |
|000002d0| 66 65 61 74 75 72 65 20 | 74 68 61 74 20 75 73 65 |feature |that use|
|000002e0| 72 73 20 6c 6f 76 65 64 | 20 61 6e 64 00 00 00 f5 |rs loved| and....|
|000002f0| 00 09 00 54 c2 64 65 76 | 65 6c 6f 70 65 72 73 20 |...T.dev|elopers |
|00000300| 68 61 74 65 64 3a 20 75 | 6e 64 6f 2e 20 20 46 6f |hated: u|ndo. Fo|
|00000310| 72 20 75 73 65 72 73 2c | 20 6b 6e 6f 77 69 6e 67 |r users,| knowing|
|00000320| 20 74 68 61 74 20 61 6e | 79 20 61 63 74 69 6f 6e | that an|y action|
|00000330| 20 63 6f 75 6c 64 20 62 | 65 20 75 6e 64 6f 6e 65 | could b|e undone|
|00000340| 20 72 65 64 75 63 65 64 | 00 00 01 01 00 09 00 54 | reduced|.......T|
|00000350| c2 64 72 61 6d 61 74 69 | 63 61 6c 6c 79 20 74 68 |.dramati|cally th|
|00000360| 65 20 6c 65 76 65 6c 20 | 6f 66 20 74 65 6e 73 69 |e level |of tensi|
|00000370| 6f 6e 20 61 73 73 6f 63 | 69 61 74 65 64 20 77 69 |on assoc|iated wi|
|00000380| 74 68 20 75 73 69 6e 67 | 20 61 20 6e 65 77 20 66 |th using| a new f|
|00000390| 65 61 74 75 72 65 20 69 | 6e 20 61 20 66 61 6d 69 |eature i|n a fami|
|000003a0| 6c 69 61 72 00 00 01 0d | 00 09 00 4e c2 61 70 70 |liar....|...N.app|
|000003b0| 6c 69 63 61 74 69 6f 6e | 2c 20 77 69 74 68 20 75 |lication|, with u|
|000003c0| 73 69 6e 67 20 61 20 6e | 65 77 20 61 70 70 2c 20 |sing a n|ew app, |
|000003d0| 6f 72 20 65 76 65 6e 20 | 77 69 74 68 20 75 73 69 |or even |with usi|
|000003e0| 6e 67 20 61 20 63 6f 6d | 70 75 74 65 72 20 69 6e |ng a com|puter in|
|000003f0| 20 67 65 6e 65 72 61 6c | 2e 20 00 00 01 19 00 09 | general|. ......|
|00000400| 00 55 c2 44 65 76 65 6c | 6f 70 65 72 73 2c 20 75 |.U.Devel|opers, u|
|00000410| 6e 66 6f 72 74 75 6e 61 | 74 65 6c 79 2c 20 68 61 |nfortuna|tely, ha|
|00000420| 64 20 74 6f 20 69 6d 70 | 6c 65 6d 65 6e 74 20 74 |d to imp|lement t|
|00000430| 68 69 73 20 67 72 65 61 | 74 20 66 75 6e 63 74 69 |his grea|t functi|
|00000440| 6f 6e 61 6c 69 74 79 2c | 20 61 6e 64 20 69 74 20 |onality,| and it |
|00000450| 77 61 73 6e ff d5 74 00 | 00 00 01 25 00 09 00 57 |wasn..t.|...%...W|
|00000460| c2 65 61 73 79 2e 20 20 | 53 74 6f 72 69 6e 67 20 |.easy. |Storing |
|00000470| 73 75 66 66 69 63 69 65 | 6e 74 20 73 74 61 74 65 |sufficie|nt state|
|00000480| 20 69 6e 20 61 6e 20 65 | 76 65 6e 74 2d 64 72 69 | in an e|vent-dri|
|00000490| 76 65 6e 20 61 70 70 6c | 69 63 61 74 69 6f 6e 20 |ven appl|ication |
|000004a0| 73 6f 20 74 68 61 74 20 | 61 6e 79 20 75 73 65 72 |so that |any user|
|000004b0| 20 61 63 74 69 6f 6e 00 | 00 00 01 31 00 09 00 2b | action.|...1...+|
|000004c0| c2 63 6f 75 6c 64 20 62 | 65 20 75 6e 64 6f 6e 65 |.could b|e undone|
|000004d0| 20 77 61 73 20 73 69 6d | 70 6c 79 20 76 65 72 79 | was sim|ply very|
|000004e0| 20 64 69 66 66 69 63 75 | 6c 74 2e 00 00 00 01 42 | difficu|lt.....B|
|000004f0| 00 24 00 4d c2 43 6f 6d | 6d 61 6e 64 20 6f 62 6a |.$.M.Com|mand obj|
|00000500| 65 63 74 73 20 69 6e 20 | 4d 61 63 41 70 70 20 31 |ects in |MacApp 1|
|00000510| 2e 30 20 6f 66 66 65 72 | 65 64 20 61 20 77 61 79 |.0 offer|ed a way|
|00000520| 20 61 72 6f 75 6e 64 20 | 74 68 69 73 20 70 72 6f | around |this pro|
|00000530| 62 6c 65 6d 20 2d 20 61 | 20 77 61 79 20 74 68 61 |blem - a| way tha|
|00000540| 74 00 00 00 01 4e 00 09 | 00 55 c2 77 61 73 20 65 |t....N..|.U.was e|
|00000550| 61 73 79 20 66 6f 72 20 | 64 65 76 65 6c 6f 70 65 |asy for |develope|
|00000560| 72 73 20 62 6f 74 68 20 | 74 6f 20 63 6f 6d 70 72 |rs both |to compr|
|00000570| 65 68 65 6e 64 20 61 6e | 64 20 74 6f 20 69 6d 70 |ehend an|d to imp|
|00000580| 6c 65 6d 65 6e 74 2e 20 | 20 41 20 63 6f 6d 6d 61 |lement. | A comma|
|00000590| 6e 64 20 6f 62 6a 65 63 | 74 20 69 73 20 61 6e 00 |nd objec|t is an.|
|000005a0| 00 00 01 5a 00 09 00 5a | c2 65 6e 63 61 70 73 75 |...Z...Z|.encapsu|
|000005b0| 6c 61 74 69 6f 6e 20 6f | 66 20 61 20 75 73 65 72 |lation o|f a user|
|000005c0| 20 72 65 71 75 65 73 74 | 20 66 6f 72 20 73 6f 6d | request| for som|
|000005d0| 65 20 61 63 74 69 6f 6e | 2e 20 20 49 74 20 73 74 |e action|. It st|
|000005e0| 6f 72 65 73 20 65 6e 6f | 75 67 68 20 69 6e 66 6f |ores eno|ugh info|
|000005f0| 72 6d 61 74 69 6f 6e 20 | 74 6f 20 62 65 20 61 62 |rmation |to be ab|
|00000600| 6c 65 00 00 01 66 00 09 | 00 59 c2 74 6f 20 70 65 |le...f..|.Y.to pe|
|00000610| 72 66 6f 72 6d 20 74 68 | 65 20 61 63 74 69 6f 6e |rform th|e action|
|00000620| 2c 20 74 6f 20 62 65 20 | 61 62 6c 65 20 74 6f 20 |, to be |able to |
|00000630| 75 6e 64 6f 20 74 68 65 | 20 61 63 74 69 6f 6e 2c |undo the| action,|
|00000640| 20 61 6e 64 20 74 6f 20 | 62 65 20 61 62 6c 65 20 | and to |be able |
|00000650| 74 6f 20 72 65 64 6f 20 | 74 68 65 20 61 63 74 69 |to redo |the acti|
|00000660| 6f 6e 2c 00 00 00 01 72 | 00 09 00 55 c2 61 6e 64 |on,....r|...U.and|
|00000670| 20 74 68 65 20 6d 65 74 | 68 6f 64 73 20 6f 66 20 | the met|hods of |
|00000680| 74 68 61 74 20 63 6f 6d | 6d 61 6e 64 20 6f 62 6a |that com|mand obj|
|00000690| 65 63 74 20 70 65 72 66 | 6f 72 6d 20 65 78 61 63 |ect perf|orm exac|
|000006a0| 74 6c 79 20 74 68 65 73 | 65 20 66 75 6e 63 74 69 |tly thes|e functi|
|000006b0| 6f 6e 73 2e 20 20 49 6e | 20 72 65 73 70 6f 6e 73 |ons. In| respons|
|000006c0| 65 00 00 00 01 7e 00 09 | 00 56 c2 74 6f 20 61 20 |e....~..|.V.to a |
|000006d0| 75 73 65 72 20 61 63 74 | 69 6f 6e 2c 20 79 6f 75 |user act|ion, you|
|000006e0| 72 20 63 6f 64 65 20 61 | 6c 6c 6f 63 61 74 65 73 |r code a|llocates|
|000006f0| 20 61 6e 20 61 70 70 72 | 6f 70 72 69 61 74 65 20 | an appr|opriate |
|00000700| 63 6f 6d 6d 61 6e 64 20 | 6f 62 6a 65 63 74 2c 20 |command |object, |
|00000710| 69 6e 69 74 69 61 6c 69 | 7a 65 73 20 74 68 61 74 |initiali|zes that|
|00000720| 00 00 01 8a 00 09 00 4b | c2 6f 62 6a 65 63 74 2c |.......K|.object,|
|00000730| 20 61 6e 64 20 74 68 65 | 6e 20 72 65 74 75 72 6e | and the|n return|
|00000740| 73 20 74 68 61 74 20 6f | 62 6a 65 63 74 20 74 6f |s that o|bject to|
|00000750| 20 74 68 65 20 66 72 61 | 6d 65 77 6f 72 6b 2e 20 | the fra|mework. |
|00000760| 20 54 68 65 20 66 72 61 | 6d 65 77 6f 72 6b 20 77 | The fra|mework w|
|00000770| 69 6c 6c 00 00 00 01 96 | 00 09 00 50 c2 69 6d 6d |ill.....|...P.imm|
|00000780| 65 64 69 61 74 65 6c 79 | 20 73 65 6e 64 20 74 68 |ediately| send th|
|00000790| 65 20 ff d2 44 6f 49 74 | ff d3 20 6d 65 73 73 61 |e ..DoIt|.. messa|
|000007a0| 67 65 20 74 6f 20 74 68 | 69 73 20 6f 62 6a 65 63 |ge to th|is objec|
|000007b0| 74 20 74 6f 20 68 61 76 | 65 20 74 68 65 20 64 65 |t to hav|e the de|
|000007c0| 73 69 72 65 64 20 61 63 | 74 69 6f 6e 00 00 01 a2 |sired ac|tion....|
|000007d0| 00 09 00 54 c2 70 65 72 | 66 6f 72 6d 65 64 2e 20 |...T.per|formed. |
|000007e0| 20 54 68 65 20 66 72 61 | 6d 65 77 6f 72 6b 20 77 | The fra|mework w|
|000007f0| 69 6c 6c 20 68 6f 6c 64 | 20 6f 6e 74 6f 20 74 68 |ill hold| onto th|
|00000800| 61 74 20 63 6f 6d 6d 61 | 6e 64 20 6f 62 6a 65 63 |at comma|nd objec|
|00000810| 74 20 61 6e 64 20 77 69 | 6c 6c 20 61 75 74 6f 6d |t and wi|ll autom|
|00000820| 61 74 69 63 61 6c 6c 79 | 00 00 01 ae 00 09 00 5a |atically|.......Z|
|00000830| c2 73 65 6e 64 20 74 68 | 65 20 ff d2 55 6e 64 6f |.send th|e ..Undo|
|00000840| 49 74 ff d3 20 61 6e 64 | 20 ff d2 52 65 64 6f 49 |It.. and| ..RedoI|
|00000850| 74 ff d3 20 6d 65 73 73 | 61 67 65 73 20 74 6f 20 |t.. mess|ages to |
|00000860| 74 68 65 20 6f 62 6a 65 | 63 74 20 69 66 20 74 68 |the obje|ct if th|
|00000870| 65 20 75 73 65 72 20 63 | 68 6f 6f 73 65 73 20 74 |e user c|hooses t|
|00000880| 68 65 20 55 6e 64 6f 20 | 6f 72 00 00 01 ba 00 09 |he Undo |or......|
|00000890| 00 51 c2 52 65 64 6f 20 | 6d 65 6e 75 20 69 74 65 |.Q.Redo |menu ite|
|000008a0| 6d 73 20 66 72 6f 6d 20 | 74 68 65 20 45 64 69 74 |ms from |the Edit|
|000008b0| 20 6d 65 6e 75 2e 20 20 | 54 68 65 20 64 65 76 65 | menu. |The deve|
|000008c0| 6c 6f 70 65 72 20 69 73 | 20 63 6f 6d 70 6c 65 74 |loper is| complet|
|000008d0| 65 6c 79 20 72 65 6c 69 | 65 76 65 64 20 6f 66 20 |ely reli|eved of |
|000008e0| 74 68 65 00 00 00 01 c6 | 00 09 00 32 c2 72 65 73 |the.....|...2.res|
|000008f0| 70 6f 6e 73 69 62 69 6c | 69 74 79 20 66 6f 72 20 |ponsibil|ity for |
|00000900| 74 68 65 20 72 75 6e 2d | 74 69 6d 65 20 68 61 6e |the run-|time han|
|00000910| 64 6c 69 6e 67 20 6f 66 | 20 55 6e 64 6f 2e 00 00 |dling of| Undo...|
|00000920| 01 d7 00 24 00 49 c2 54 | 6f 20 69 6c 6c 75 73 74 |...$.I.T|o illust|
|00000930| 72 61 74 65 20 74 68 65 | 73 65 20 69 64 65 61 73 |rate the|se ideas|
|00000940| 2c 20 49 20 68 61 76 65 | 20 69 6d 70 6c 65 6d 65 |, I have| impleme|
|00000950| 6e 74 65 64 20 61 6e 20 | 65 6e 68 61 6e 63 65 64 |nted an |enhanced|
|00000960| 20 76 65 72 73 69 6f 6e | 20 6f 66 20 74 68 65 00 | version| of the.|
|00000970| 00 00 01 e3 00 09 00 52 | c2 4d 69 6e 69 51 75 61 |.......R|.MiniQua|
|00000980| 64 57 6f 72 6c 64 20 5b | 31 5d 20 61 70 70 6c 69 |dWorld [|1] appli|
|00000990| 63 61 74 69 6f 6e 20 69 | 6e 20 43 50 58 2e 20 20 |cation i|n CPX. |
|000009a0| 54 68 65 20 50 72 6f 67 | 72 61 70 68 20 76 65 72 |The Prog|raph ver|
|000009b0| 73 69 6f 6e 20 6f 66 20 | 74 68 69 73 20 61 70 70 |sion of |this app|
|000009c0| 20 69 73 20 6f 6e 20 74 | 68 65 00 00 01 ef 00 09 | is on t|he......|
|000009d0| 00 5a c2 73 6f 75 72 63 | 65 20 63 6f 64 65 20 64 |.Z.sourc|e code d|
|000009e0| 69 73 6b 73 20 61 6e 64 | 20 74 68 65 20 6f 6e 6c |isks and| the onl|
|000009f0| 69 6e 65 20 73 69 74 65 | 73 2c 20 61 6c 6f 6e 67 |ine site|s, along|
|00000a00| 20 77 69 74 68 20 74 68 | 65 20 66 75 6c 6c 20 73 | with th|e full s|
|00000a10| 6f 75 72 63 65 20 63 6f | 64 65 20 28 62 6f 74 68 |ource co|de (both|
|00000a20| 20 69 6e 20 73 74 61 6e | 64 61 72 64 00 00 01 fb | in stan|dard....|
|00000a30| 00 09 00 56 c2 50 72 6f | 67 72 61 70 68 20 70 72 |...V.Pro|graph pr|
|00000a40| 6f 6a 65 63 74 20 61 6e | 64 20 73 65 63 74 69 6f |oject an|d sectio|
|00000a50| 6e 20 66 69 6c 65 73 20 | 2d 20 66 6f 72 20 74 68 |n files |- for th|
|00000a60| 6f 73 65 20 6f 66 20 79 | 6f 75 20 77 68 6f 20 68 |ose of y|ou who h|
|00000a70| 61 76 65 20 43 50 58 20 | 2d 20 61 6e 64 20 69 6e |ave CPX |- and in|
|00000a80| 20 50 49 43 54 73 20 66 | 6f 72 00 00 02 07 00 09 | PICTs f|or......|
|00000a90| 00 5d c2 74 68 6f 73 65 | 20 6f 66 20 79 6f 75 20 |.].those| of you |
|00000aa0| 77 68 6f 20 64 6f 6e ff | d5 74 29 2e 20 20 41 6c |who don.|.t). Al|
|00000ab0| 73 6f 2c 20 74 68 65 20 | 63 6f 64 65 20 66 6f 72 |so, the |code for|
|00000ac0| 20 74 68 69 73 20 61 70 | 70 6c 69 63 61 74 69 6f | this ap|plicatio|
|00000ad0| 6e 20 66 6f 6c 6c 6f 77 | 73 20 74 68 65 20 6c 61 |n follow|s the la|
|00000ae0| 74 65 73 74 20 76 65 72 | 73 69 6f 6e 20 6f 66 00 |test ver|sion of.|
|00000af0| 00 00 02 13 00 09 00 2b | c2 74 68 65 20 65 6d 65 |.......+|.the eme|
|00000b00| 72 67 69 6e 67 20 50 72 | 6f 67 72 61 70 68 20 63 |rging Pr|ograph c|
|00000b10| 6f 64 69 6e 67 20 73 74 | 79 6c 65 20 5b 32 2c 20 |oding st|yle [2, |
|00000b20| 33 5d 2e 00 00 00 02 29 | 00 70 00 23 c4 42 72 69 |3].....)|.p.#.Bri|
|00000b30| 65 66 20 52 65 76 69 65 | 77 20 6f 66 20 43 6f 6d |ef Revie|w of Com|
|00000b40| 6d 61 6e 64 73 20 69 6e | 20 4d 61 63 41 70 70 00 |mands in| MacApp.|
|00000b50| 00 00 02 3f 00 09 00 57 | c2 42 6f 74 68 20 4d 61 |...?...W|.Both Ma|
|00000b60| 63 41 70 70 20 61 6e 64 | 20 43 50 58 20 68 61 76 |cApp and| CPX hav|
|00000b70| 65 20 62 61 73 69 63 61 | 6c 6c 79 20 74 68 65 20 |e basica|lly the |
|00000b80| 73 61 6d 65 20 61 70 70 | 72 6f 61 63 68 20 74 6f |same app|roach to|
|00000b90| 20 6d 65 6e 75 20 6f 70 | 65 72 61 74 69 6f 6e 2c | menu op|eration,|
|00000ba0| 20 73 6f 20 6c 65 74 ff | d5 73 20 64 6f 20 61 00 | so let.|.s do a.|
|00000bb0| 00 00 02 4b 00 09 00 53 | c2 71 75 69 63 6b 20 72 |...K...S|.quick r|
|00000bc0| 65 76 69 65 77 20 6f 66 | 20 63 6f 6d 6d 61 6e 64 |eview of| command|
|00000bd0| 20 68 61 6e 64 6c 69 6e | 67 20 69 6e 20 4d 61 63 | handlin|g in Mac|
|00000be0| 41 70 70 20 32 20 61 6e | 64 20 4d 61 63 41 70 70 |App 2 an|d MacApp|
|00000bf0| 20 33 20 62 65 66 6f 72 | 65 20 77 65 20 74 61 6c | 3 befor|e we tal|
|00000c00| 6b 20 61 62 6f 75 74 20 | 74 68 65 00 00 00 02 57 |k about |the....W|
|00000c10| 00 09 00 4e c2 64 65 74 | 61 69 6c 73 20 6f 66 20 |...N.det|ails of |
|00000c20| 43 50 58 ff d5 73 2e 20 | 20 54 68 65 20 63 6f 6d |CPX..s. | The com|
|00000c30| 6d 61 6e 64 20 68 61 6e | 64 6c 69 6e 67 20 64 65 |mand han|dling de|
|00000c40| 73 69 67 6e 73 20 6f 66 | 20 4d 61 63 41 70 70 20 |signs of| MacApp |
|00000c50| 32 20 61 6e 64 20 4d 61 | 63 41 70 70 20 33 20 61 |2 and Ma|cApp 3 a|
|00000c60| 72 65 00 00 02 63 00 09 | 00 37 c2 64 69 66 66 65 |re...c..|.7.diffe|
|00000c70| 72 65 6e 74 20 65 6e 6f | 75 67 68 20 74 68 61 74 |rent eno|ugh that|
|00000c80| 20 77 65 20 77 69 6c 6c | 20 65 78 61 6d 69 6e 65 | we will| examine|
|00000c90| 20 65 61 63 68 20 73 65 | 70 61 72 61 74 65 6c 79 | each se|parately|
|00000ca0| 2e 00 00 00 02 7d 00 09 | 00 15 c4 43 6f 6d 6d 61 |.....}..|...Comma|
|00000cb0| 6e 64 73 20 69 6e 20 4d | 61 63 41 70 70 20 32 00 |nds in M|acApp 2.|
|00000cc0| 00 00 02 93 00 24 00 4c | c2 59 6f 75 20 61 63 63 |.....$.L|.You acc|
|00000cd0| 65 73 73 20 74 68 65 20 | 63 6f 6d 6d 61 6e 64 20 |ess the |command |
|00000ce0| 68 61 6e 64 6c 69 6e 67 | 20 61 70 70 61 72 61 74 |handling| apparat|
|00000cf0| 75 73 20 6f 66 20 4d 61 | 63 41 70 70 20 32 20 77 |us of Ma|cApp 2 w|
|00000d00| 69 74 68 20 ff d2 68 6f | 6f 6b ff d3 20 6d 65 74 |ith ..ho|ok.. met|
|00000d10| 68 6f 64 73 00 00 02 9f | 00 09 00 4a c2 6c 69 6b |hods....|...J.lik|
|00000d20| 65 20 44 6f 4d 65 6e 75 | 43 6f 6d 6d 61 6e 64 20 |e DoMenu|Command |
|00000d30| 61 6e 64 20 44 6f 4d 6f | 75 73 65 43 6f 6d 6d 61 |and DoMo|useComma|
|00000d40| 6e 64 2e 20 20 28 46 69 | 67 75 72 65 20 31 20 64 |nd. (Fi|gure 1 d|
|00000d50| 65 70 69 63 74 73 20 74 | 68 65 20 63 6c 61 73 73 |epicts t|he class|
|00000d60| 65 73 20 61 6e 64 00 00 | 02 ab 00 09 00 51 c2 69 |es and..|.....Q.i|
|00000d70| 6d 70 6f 72 74 61 6e 74 | 20 6d 65 74 68 6f 64 73 |mportant| methods|
|00000d80| 20 69 6e 20 74 68 69 73 | 20 61 70 70 61 72 61 74 | in this| apparat|
|00000d90| 75 73 2e 29 20 4d 61 63 | 41 70 70 20 77 69 6c 6c |us.) Mac|App will|
|00000da0| 20 63 61 6c 6c 20 74 68 | 65 73 65 20 6d 65 74 68 | call th|ese meth|
|00000db0| 6f 64 73 20 77 68 65 6e | 20 61 20 6d 65 6e 75 00 |ods when| a menu.|
|00000dc0| 00 00 02 b7 00 09 00 4c | c2 69 74 65 6d 20 69 73 |.......L|.item is|
|00000dd0| 20 63 68 6f 73 65 6e 20 | 28 44 6f 4d 65 6e 75 43 | chosen |(DoMenuC|
|00000de0| 6f 6d 6d 61 6e 64 29 20 | 6f 72 20 77 68 65 6e 20 |ommand) |or when |
|00000df0| 74 68 65 20 75 73 65 72 | 20 63 6c 69 63 6b 73 20 |the user| clicks |
|00000e00| 69 6e 20 6f 6e 65 20 6f | 66 20 79 6f 75 72 20 76 |in one o|f your v|
|00000e10| 69 65 77 73 00 00 02 c3 | 00 09 00 4b c2 28 44 6f |iews....|...K.(Do|
|00000e20| 4d 6f 75 73 65 43 6f 6d | 6d 61 6e 64 29 2e 20 20 |MouseCom|mand). |
|00000e30| 28 49 6e 20 74 68 65 20 | 63 61 73 65 20 6f 66 20 |(In the |case of |
|00000e40| 44 6f 4d 65 6e 75 43 6f | 6d 6d 61 6e 64 2c 20 74 |DoMenuCo|mmand, t|
|00000e50| 68 65 20 61 72 67 75 6d | 65 6e 74 20 77 69 6c 6c |he argum|ent will|
|00000e60| 20 62 65 20 74 68 65 00 | 00 00 02 cf 00 09 00 4b | be the.|.......K|
|00000e70| c2 63 6f 6d 6d 61 6e 64 | 20 6e 75 6d 62 65 72 20 |.command| number |
|00000e80| 6f 66 20 74 68 65 20 64 | 65 73 69 72 65 64 20 63 |of the d|esired c|
|00000e90| 6f 6d 6d 61 6e 64 2e 20 | 20 49 6e 20 74 68 65 20 |ommand. | In the |
|00000ea0| 63 61 73 65 20 6f 66 20 | 44 6f 4d 6f 75 73 65 43 |case of |DoMouseC|
|00000eb0| 6f 6d 6d 61 6e 64 2c 20 | 74 68 65 00 00 00 02 db |ommand, |the.....|
|00000ec0| 00 09 00 53 c2 61 72 67 | 75 6d 65 6e 74 73 20 77 |...S.arg|uments w|
|00000ed0| 69 6c 6c 20 69 6e 63 6c | 75 64 65 20 74 68 65 20 |ill incl|ude the |
|00000ee0| 63 6c 69 63 6b 20 70 6f | 69 6e 74 2c 20 66 72 6f |click po|int, fro|
|00000ef0| 6d 20 77 68 69 63 68 20 | 79 6f 75 20 6e 65 65 64 |m which |you need|
|00000f00| 20 74 6f 20 64 65 74 65 | 72 6d 69 6e 65 20 74 68 | to dete|rmine th|
|00000f10| 65 20 72 69 67 68 74 00 | 00 00 02 e7 00 09 00 54 |e right.|.......T|
|00000f20| c2 74 79 70 65 20 6f 66 | 20 63 6f 6d 6d 61 6e 64 |.type of| command|
|00000f30| 2e 29 20 59 6f 75 20 6f | 76 65 72 72 69 64 65 20 |.) You o|verride |
|00000f40| 74 68 65 73 65 20 6d 65 | 74 68 6f 64 73 20 74 6f |these me|thods to|
|00000f50| 20 61 6c 6c 6f 63 61 74 | 65 20 61 6e 20 69 6e 73 | allocat|e an ins|
|00000f60| 74 61 6e 63 65 20 6f 66 | 20 6f 6e 65 20 6f 66 20 |tance of| one of |
|00000f70| 79 6f 75 72 00 00 02 f3 | 00 09 00 51 c2 63 6f 6d |your....|...Q.com|
|00000f80| 6d 61 6e 64 20 6f 62 6a | 65 63 74 73 2c 20 61 6e |mand obj|ects, an|
|00000f90| 64 20 74 68 65 6e 20 72 | 65 74 75 72 6e 20 74 68 |d then r|eturn th|
|00000fa0| 61 74 20 6f 62 6a 65 63 | 74 20 61 73 20 74 68 65 |at objec|t as the|
|00000fb0| 20 72 65 74 75 72 6e 20 | 76 61 6c 75 65 20 6f 66 | return |value of|
|00000fc0| 20 74 68 65 20 6d 65 74 | 68 6f 64 2e 20 00 00 00 | the met|hod. ...|
|00000fd0| 02 ff 00 09 00 54 c2 54 | 41 70 70 6c 69 63 61 74 |.....T.T|Applicat|
|00000fe0| 69 6f 6e 2e 50 65 72 66 | 6f 72 6d 43 6f 6d 6d 61 |ion.Perf|ormComma|
|00000ff0| 6e 64 20 77 69 6c 6c 20 | 65 76 65 6e 74 75 61 6c |nd will |eventual|
|00001000| 6c 79 20 63 61 6c 6c 20 | 74 68 61 74 20 63 6f 6d |ly call |that com|
|00001010| 6d 61 6e 64 20 6f 62 6a | 65 63 74 ff d5 73 20 44 |mand obj|ect..s D|
|00001020| 6f 49 74 20 6d 65 74 68 | 6f 64 00 00 03 0b 00 09 |oIt meth|od......|
|00001030| 00 44 c2 61 6e 64 2c 20 | 69 66 20 69 74 20 69 73 |.D.and, |if it is|
|00001040| 20 61 6e 20 75 6e 64 6f | 61 62 6c 65 20 63 6f 6d | an undo|able com|
|00001050| 6d 61 6e 64 2c 20 77 69 | 6c 6c 20 73 74 6f 72 65 |mand, wi|ll store|
|00001060| 20 74 68 65 20 63 6f 6d | 6d 61 6e 64 20 6f 62 6a | the com|mand obj|
|00001070| 65 63 74 20 69 6e 00 00 | 03 17 00 09 00 4c c2 54 |ect in..|.....L.T|
|00001080| 41 70 70 6c 69 63 61 74 | 69 6f 6e 2e 66 4c 61 73 |Applicat|ion.fLas|
|00001090| 74 43 6f 6d 6d 61 6e 64 | 2e 20 20 53 68 6f 75 6c |tCommand|. Shoul|
|000010a0| 64 20 74 68 65 20 75 73 | 65 72 20 63 68 6f 6f 73 |d the us|er choos|
|000010b0| 65 20 74 68 65 20 55 6e | 64 6f 20 6d 65 6e 75 20 |e the Un|do menu |
|000010c0| 69 74 65 6d 2c 20 74 68 | 65 6e 00 00 03 23 00 09 |item, th|en...#..|
|000010d0| 00 52 c2 54 41 70 70 6c | 69 63 61 74 69 6f 6e 2e |.R.TAppl|ication.|
|000010e0| 44 6f 4d 65 6e 75 43 6f | 6d 6d 61 6e 64 20 77 69 |DoMenuCo|mmand wi|
|000010f0| 6c 6c 20 61 6c 6c 6f 63 | 61 74 65 20 61 6e 20 69 |ll alloc|ate an i|
|00001100| 6e 73 74 61 6e 63 65 20 | 6f 66 20 54 55 6e 64 6f |nstance |of TUndo|
|00001110| 52 65 64 6f 43 6f 6d 6d | 61 6e 64 20 77 68 69 63 |RedoComm|and whic|
|00001120| 68 20 69 6e 00 00 03 2f | 00 09 00 45 c2 74 75 72 |h in.../|...E.tur|
|00001130| 6e 20 77 69 6c 6c 20 63 | 61 6c 6c 20 74 68 65 20 |n will c|all the |
|00001140| 55 6e 64 6f 49 74 20 6d | 65 74 68 6f 64 20 6f 66 |UndoIt m|ethod of|
|00001150| 20 74 68 65 20 73 74 6f | 72 65 64 20 63 6f 6d 6d | the sto|red comm|
|00001160| 61 6e 64 2e 20 20 28 4e | 61 74 75 72 61 6c 6c 79 |and. (N|aturally|
|00001170| 2c 00 00 00 03 3b 00 09 | 00 35 c2 54 55 6e 64 6f |,....;..|.5.TUndo|
|00001180| 52 65 64 6f 43 6f 6d 6d | 61 6e 64 20 69 73 20 6e |RedoComm|and is n|
|00001190| 6f 74 20 69 74 73 65 6c | 66 20 61 6e 20 75 6e 64 |ot itsel|f an und|
|000011a0| 6f 61 62 6c 65 20 63 6f | 6d 6d 61 6e 64 2e 29 00 |oable co|mmand.).|
|000011b0| 00 00 03 4c 00 24 00 4c | c2 54 68 65 72 65 20 69 |...L.$.L|.There i|
|000011c0| 73 20 61 6c 73 6f 20 61 | 20 63 6f 6d 6d 61 6e 64 |s also a| command|
|000011d0| 20 71 75 65 75 65 20 66 | 6f 72 20 68 61 6e 64 6c | queue f|or handl|
|000011e0| 69 6e 67 20 63 6f 6d 6d | 61 6e 64 73 20 69 6e 20 |ing comm|ands in |
|000011f0| 74 68 65 20 62 61 63 6b | 67 72 6f 75 6e 64 20 61 |the back|ground a|
|00001200| 6e 64 20 61 00 00 03 58 | 00 09 00 38 c2 6d 65 63 |nd a...X|...8.mec|
|00001210| 68 61 6e 69 73 6d 20 66 | 6f 72 20 65 78 65 63 75 |hanism f|or execu|
|00001220| 74 69 6e 67 20 61 20 63 | 6f 6d 6d 61 6e 64 20 6f |ting a c|ommand o|
|00001230| 6e 20 61 20 72 65 63 75 | 72 72 69 6e 67 20 62 61 |n a recu|rring ba|
|00001240| 73 69 73 2e 00 00 03 f0 | 00 04 00 06 c2 f0 00 82 |sis.....|........|
|00001250| 01 ac 00 00 04 0b 00 37 | 00 46 c6 46 69 67 75 72 |.......7|.F.Figur|
|00001260| 65 20 31 2e 20 20 54 68 | 65 20 63 6c 61 73 73 65 |e 1. Th|e classe|
|00001270| 73 2c 20 6d 65 74 68 6f | 64 73 2c 20 61 6e 64 20 |s, metho|ds, and |
|00001280| 66 69 65 6c 64 73 20 74 | 68 61 74 20 70 6c 61 79 |fields t|hat play|
|00001290| 20 69 6d 70 6f 72 74 61 | 6e 74 20 72 6f 6c 65 73 | importa|nt roles|
|000012a0| 00 00 04 17 00 89 00 21 | c6 69 6e 20 63 6f 6d 6d |.......!|.in comm|
|000012b0| 61 6e 64 20 68 61 6e 64 | 6c 69 6e 67 20 69 6e 20 |and hand|ling in |
|000012c0| 4d 61 63 41 70 70 20 32 | 2e 00 00 00 04 32 00 24 |MacApp 2|.....2.$|
|000012d0| 00 44 c2 4d 6f 73 74 20 | 6f 66 20 74 68 65 20 62 |.D.Most |of the b|
|000012e0| 61 73 69 63 20 6f 70 65 | 72 61 74 69 6f 6e 73 20 |asic ope|rations |
|000012f0| 74 68 61 74 20 4d 61 63 | 41 70 70 20 70 65 72 66 |that Mac|App perf|
|00001300| 6f 72 6d 73 20 61 75 74 | 6f 6d 61 74 69 63 61 6c |orms aut|omatical|
|00001310| 6c 79 20 28 6f 72 00 00 | 04 3e 00 09 00 54 c2 73 |ly (or..|.>...T.s|
|00001320| 65 6d 69 2d 61 75 74 6f | 6d 61 74 69 63 61 6c 6c |emi-auto|maticall|
|00001330| 79 29 20 6c 69 6b 65 20 | 73 61 76 69 6e 67 20 64 |y) like |saving d|
|00001340| 6f 63 75 6d 65 6e 74 73 | 2c 20 72 65 76 65 72 74 |ocuments|, revert|
|00001350| 69 6e 67 2c 20 71 75 69 | 74 74 69 6e 67 2c 20 6f |ing, qui|tting, o|
|00001360| 70 65 6e 69 6e 67 20 61 | 6e 64 20 63 6c 6f 73 69 |pening a|nd closi|
|00001370| 6e 67 00 00 04 4a 00 09 | 00 51 c2 77 69 6e 64 6f |ng...J..|.Q.windo|
|00001380| 77 73 2c 20 61 6e 64 20 | 73 75 63 68 20 61 72 65 |ws, and |such are|
|00001390| 20 64 6f 6e 65 20 77 69 | 74 68 20 73 70 65 63 69 | done wi|th speci|
|000013a0| 66 69 63 20 54 43 6f 6d | 6d 61 6e 64 20 73 75 62 |fic TCom|mand sub|
|000013b0| 63 6c 61 73 73 65 73 20 | 74 68 61 74 20 61 72 65 |classes |that are|
|000013c0| 20 62 75 69 6c 74 20 69 | 6e 74 6f 00 00 00 04 56 | built i|nto....V|
|000013d0| 00 09 00 4a c2 4d 61 63 | 41 70 70 2e 20 20 54 68 |...J.Mac|App. Th|
|000013e0| 65 73 65 20 69 6e 63 6c | 75 64 65 20 74 68 65 20 |ese incl|ude the |
|000013f0| 63 6c 61 73 73 65 73 20 | 54 41 62 6f 75 74 41 70 |classes |TAboutAp|
|00001400| 70 43 6f 6d 6d 61 6e 64 | 2c 20 54 43 6c 6f 73 65 |pCommand|, TClose|
|00001410| 57 69 6e 64 6f 77 43 6f | 6d 6d 61 6e 64 2c 00 00 |WindowCo|mmand,..|
|00001420| 04 62 00 09 00 30 c2 54 | 4e 65 77 44 6f 63 43 6f |.b...0.T|NewDocCo|
|00001430| 6d 6d 61 6e 64 2c 20 54 | 52 6f 77 53 65 6c 65 63 |mmand, T|RowSelec|
|00001440| 74 43 6f 6d 6d 61 6e 64 | 20 28 66 6f 72 20 61 20 |tCommand| (for a |
|00001450| 67 72 69 64 29 2e 00 00 | 04 7c 00 09 00 15 c4 43 |grid)...|.|.....C|
|00001460| 6f 6d 6d 61 6e 64 73 20 | 69 6e 20 4d 61 63 41 70 |ommands |in MacAp|
|00001470| 70 20 33 00 00 00 04 92 | 00 24 00 48 c2 54 68 65 |p 3.....|.$.H.The|
|00001480| 20 63 6f 6d 6d 61 6e 64 | 20 61 70 70 61 72 61 74 | command| apparat|
|00001490| 75 73 20 66 6f 72 20 4d | 61 63 41 70 70 20 33 20 |us for M|acApp 3 |
|000014a0| 69 73 20 73 69 6d 69 6c | 61 72 20 62 75 74 20 73 |is simil|ar but s|
|000014b0| 6f 6d 65 77 68 61 74 20 | 6d 6f 72 65 20 63 6f 6d |omewhat |more com|
|000014c0| 70 6c 65 78 00 00 04 9e | 00 09 00 54 c2 74 68 61 |plex....|...T.tha|
|000014d0| 6e 20 74 68 61 74 20 6f | 66 20 4d 61 63 41 70 70 |n that o|f MacApp|
|000014e0| 20 32 2e 20 20 28 46 69 | 67 75 72 65 20 32 20 64 | 2. (Fi|gure 2 d|
|000014f0| 65 70 69 63 74 73 20 74 | 68 65 20 63 6c 61 73 73 |epicts t|he class|
|00001500| 65 73 20 61 6e 64 20 69 | 6d 70 6f 72 74 61 6e 74 |es and i|mportant|
|00001510| 20 6d 65 74 68 6f 64 73 | 20 69 6e 20 74 68 69 73 | methods| in this|
|00001520| 00 00 04 aa 00 09 00 4e | c2 61 70 70 61 72 61 74 |.......N|.apparat|
|00001530| 75 73 2e 29 20 54 68 65 | 72 65 20 69 73 20 61 6e |us.) The|re is an|
|00001540| 20 61 64 64 69 74 69 6f | 6e 61 6c 20 63 6c 61 73 | additio|nal clas|
|00001550| 73 2c 20 54 43 6f 6d 6d | 61 6e 64 48 61 6e 64 6c |s, TComm|andHandl|
|00001560| 65 72 2c 20 77 68 69 63 | 68 20 70 72 6f 76 69 64 |er, whic|h provid|
|00001570| 65 73 20 74 68 65 00 00 | 04 b6 00 09 00 56 c2 66 |es the..|.....V.f|
|00001580| 75 6e 63 74 69 6f 6e 61 | 6c 69 74 79 20 66 6f 72 |unctiona|lity for|
|00001590| 20 73 74 6f 72 69 6e 67 | 20 74 68 65 20 6c 61 73 | storing| the las|
|000015a0| 74 20 63 6f 6d 6d 61 6e | 64 2c 20 70 72 6f 63 65 |t comman|d, proce|
|000015b0| 73 73 69 6e 67 20 75 6e | 64 6f 20 72 65 71 75 65 |ssing un|do reque|
|000015c0| 73 74 73 2c 20 65 74 63 | 2e 20 20 53 69 6e 63 65 |sts, etc|. Since|
|000015d0| 20 74 68 65 00 00 04 c2 | 00 09 00 52 c2 6d 61 69 | the....|...R.mai|
|000015e0| 6e 20 61 62 73 74 72 61 | 63 74 20 73 75 70 65 72 |n abstra|ct super|
|000015f0| 63 6c 61 73 73 65 73 20 | 74 68 61 74 20 61 20 70 |classes |that a p|
|00001600| 72 6f 67 72 61 6d 6d 65 | 72 20 64 65 61 6c 73 20 |rogramme|r deals |
|00001610| 77 69 74 68 20 28 54 41 | 70 70 6c 69 63 61 74 69 |with (TA|pplicati|
|00001620| 6f 6e 2c 20 54 44 6f 63 | 75 6d 65 6e 74 2c 00 00 |on, TDoc|ument,..|
|00001630| 04 ce 00 09 00 57 c2 54 | 56 69 65 77 29 20 61 72 |.....W.T|View) ar|
|00001640| 65 20 73 75 62 63 6c 61 | 73 73 65 73 20 6f 66 20 |e subcla|sses of |
|00001650| 54 43 6f 6d 6d 61 6e 64 | 48 61 6e 64 6c 65 72 2c |TCommand|Handler,|
|00001660| 20 74 68 69 73 20 67 69 | 76 65 73 20 65 61 63 68 | this gi|ves each|
|00001670| 20 6f 66 20 74 68 65 73 | 65 20 6f 62 6a 65 63 74 | of thes|e object|
|00001680| 73 20 74 68 65 20 61 62 | 69 6c 69 74 79 00 00 00 |s the ab|ility...|
|00001690| 04 da 00 09 00 53 c2 74 | 6f 20 75 6e 64 6f 20 69 |.....S.t|o undo i|
|000016a0| 74 73 20 6f 77 6e 20 6c | 61 73 74 20 63 6f 6d 6d |ts own l|ast comm|
|000016b0| 61 6e 64 2e 20 20 54 68 | 75 73 20 65 61 63 68 20 |and. Th|us each |
|000016c0| 75 73 65 72 20 63 6f 6e | 74 65 78 74 20 28 77 69 |user con|text (wi|
|000016d0| 6e 64 6f 77 20 6f 72 20 | 64 6f 63 75 6d 65 6e 74 |ndow or |document|
|000016e0| 29 20 68 61 73 20 69 74 | 73 00 00 00 04 e6 00 09 |) has it|s.......|
|000016f0| 00 0a c2 6f 77 6e 20 75 | 6e 64 6f 2e 00 00 05 a1 |...own u|ndo.....|
|00001700| 00 04 00 06 c2 f0 00 83 | 01 ac 00 00 05 bc 00 76 |........|.......v|
|00001710| 00 2c c6 46 69 67 75 72 | 65 20 32 2e 20 20 54 68 |.,.Figur|e 2. Th|
|00001720| 65 20 63 6c 61 73 73 65 | 73 2c 20 6d 65 74 68 6f |e classe|s, metho|
|00001730| 64 73 2c 20 61 6e 64 20 | 66 69 65 6c 64 73 00 00 |ds, and |fields..|
|00001740| 05 c8 00 4a 00 3b c6 74 | 68 61 74 20 70 6c 61 79 |...J.;.t|hat play|
|00001750| 20 69 6d 70 6f 72 74 61 | 6e 74 20 72 6f 6c 65 73 | importa|nt roles|
|00001760| 20 69 6e 20 63 6f 6d 6d | 61 6e 64 20 68 61 6e 64 | in comm|and hand|
|00001770| 6c 69 6e 67 20 69 6e 20 | 4d 61 63 41 70 70 20 33 |ling in |MacApp 3|
|00001780| 2e 00 00 00 05 d4 00 2d | 00 49 c6 28 4e 6f 74 65 |.......-|.I.(Note|
|00001790| 20 74 68 65 20 61 64 64 | 69 74 69 6f 6e 20 6f 66 | the add|ition of|
|000017a0| 20 73 65 76 65 72 61 6c | 20 6e 65 77 20 63 6c 61 | several| new cla|
|000017b0| 73 73 65 73 20 63 6f 6d | 70 61 72 65 64 20 74 6f |sses com|pared to|
|000017c0| 20 74 68 61 74 20 6f 66 | 20 4d 61 63 41 70 70 20 | that of| MacApp |
|000017d0| 32 2e 29 00 00 00 05 ef | 00 24 00 49 c2 41 6e 20 |2.).....|.$.I.An |
|000017e0| 61 64 64 69 74 69 6f 6e | 61 6c 20 63 68 61 6e 67 |addition|al chang|
|000017f0| 65 20 69 73 20 74 68 61 | 74 20 74 68 65 20 6f 6c |e is tha|t the ol|
|00001800| 64 20 ff d2 68 6f 6f 6b | ff d3 20 6d 65 74 68 6f |d ..hook|.. metho|
|00001810| 64 73 2c 20 44 6f 4d 65 | 6e 75 43 6f 6d 6d 61 6e |ds, DoMe|nuComman|
|00001820| 64 20 61 6e 64 00 00 00 | 05 fb 00 09 00 52 c2 44 |d and...|.....R.D|
|00001830| 6f 4d 6f 75 73 65 43 6f | 6d 6d 61 6e 64 2c 20 6e |oMouseCo|mmand, n|
|00001840| 6f 20 6c 6f 6e 67 65 72 | 20 72 65 74 75 72 6e 20 |o longer| return |
|00001850| 74 68 65 20 63 6f 6d 6d | 61 6e 64 20 6f 62 6a 65 |the comm|and obje|
|00001860| 63 74 20 74 6f 20 74 68 | 65 20 66 72 61 6d 65 77 |ct to th|e framew|
|00001870| 6f 72 6b 2e 20 20 52 61 | 74 68 65 72 20 74 68 65 |ork. Ra|ther the|
|00001880| 00 00 06 07 00 09 00 4d | c2 70 72 6f 67 72 61 6d |.......M|.program|
|00001890| 6d 65 72 20 70 6f 73 74 | 73 20 74 68 65 20 63 6f |mer post|s the co|
|000018a0| 6d 6d 61 6e 64 20 28 75 | 73 69 6e 67 20 54 41 70 |mmand (u|sing TAp|
|000018b0| 70 6c 69 63 61 74 69 6f | 6e 2e 50 6f 73 74 43 6f |plicatio|n.PostCo|
|000018c0| 6d 6d 61 6e 64 29 20 77 | 68 69 63 68 20 61 64 64 |mmand) w|hich add|
|000018d0| 73 20 74 68 65 00 00 00 | 06 13 00 09 00 4f c2 63 |s the...|.....O.c|
|000018e0| 6f 6d 6d 61 6e 64 20 74 | 6f 20 74 68 65 20 65 6e |ommand t|o the en|
|000018f0| 64 20 6f 66 20 74 68 65 | 20 65 76 65 6e 74 20 6c |d of the| event l|
|00001900| 69 73 74 2e 20 20 28 54 | 56 69 65 77 20 61 6e 64 |ist. (T|View and|
|00001910| 20 54 44 6f 63 75 6d 65 | 6e 74 20 68 61 76 65 20 | TDocume|nt have |
|00001920| 61 20 50 6f 73 74 43 6f | 6d 6d 61 6e 64 00 00 00 |a PostCo|mmand...|
|00001930| 06 1f 00 09 00 54 c2 6d | 65 74 68 6f 64 2c 20 62 |.....T.m|ethod, b|
|00001940| 75 74 20 61 6c 6c 20 74 | 68 65 73 65 20 6d 65 74 |ut all t|hese met|
|00001950| 68 6f 64 73 20 64 6f 20 | 69 73 20 70 61 73 73 20 |hods do |is pass |
|00001960| 74 68 65 20 63 6f 6d 6d | 61 6e 64 20 6f 6e 20 74 |the comm|and on t|
|00001970| 6f 20 74 68 65 20 61 70 | 70 6c 69 63 61 74 69 6f |o the ap|plicatio|
|00001980| 6e 20 6f 62 6a 65 63 74 | 2e 29 00 00 06 2b 00 09 |n object|.)...+..|
|00001990| 00 52 c2 54 68 65 73 65 | 20 68 6f 6f 6b 20 6d 65 |.R.These| hook me|
|000019a0| 74 68 6f 64 73 20 61 72 | 65 20 73 74 69 6c 6c 20 |thods ar|e still |
|000019b0| 69 6e 76 6f 6b 65 64 20 | 62 79 20 74 68 65 20 66 |invoked |by the f|
|000019c0| 72 61 6d 65 77 6f 72 6b | 2c 20 68 6f 77 65 76 65 |ramework|, howeve|
|000019d0| 72 2c 20 73 6f 20 74 68 | 61 74 20 79 6f 75 72 20 |r, so th|at your |
|000019e0| 63 6f 64 65 00 00 06 37 | 00 09 00 40 c2 6b 6e 6f |code...7|...@.kno|
|000019f0| 77 73 20 74 68 65 20 61 | 70 70 72 6f 70 72 69 61 |ws the a|ppropria|
|00001a00| 74 65 20 74 69 6d 65 20 | 74 6f 20 69 6e 73 74 61 |te time |to insta|
|00001a10| 6e 74 69 61 74 65 20 61 | 20 6e 65 77 20 63 6f 6d |ntiate a| new com|
|00001a20| 6d 61 6e 64 20 6f 62 6a | 65 63 74 2e 00 00 06 48 |mand obj|ect....H|
|00001a30| 00 24 00 50 c2 41 73 20 | 69 6e 20 4d 61 63 41 70 |.$.P.As |in MacAp|
|00001a40| 70 20 32 2c 20 6d 6f 73 | 74 20 6f 66 20 74 68 65 |p 2, mos|t of the|
|00001a50| 20 62 61 73 69 63 20 6f | 70 65 72 61 74 69 6f 6e | basic o|peration|
|00001a60| 73 20 74 68 61 74 20 4d | 61 63 41 70 70 20 70 65 |s that M|acApp pe|
|00001a70| 72 66 6f 72 6d 73 20 61 | 75 74 6f 6d 61 74 69 63 |rforms a|utomatic|
|00001a80| 61 6c 6c 79 00 00 06 54 | 00 09 00 49 c2 28 6f 72 |ally...T|...I.(or|
|00001a90| 20 73 65 6d 69 2d 61 75 | 74 6f 6d 61 74 69 63 61 | semi-au|tomatica|
|00001aa0| 6c 6c 79 29 20 6c 69 6b | 65 20 73 61 76 69 6e 67 |lly) lik|e saving|
|00001ab0| 20 64 6f 63 75 6d 65 6e | 74 73 2c 20 72 65 76 65 | documen|ts, reve|
|00001ac0| 72 74 69 6e 67 2c 20 70 | 75 62 6c 69 73 68 69 6e |rting, p|ublishin|
|00001ad0| 67 20 61 6e 64 00 00 00 | 06 60 00 09 00 52 c2 73 |g and...|.`...R.s|
|00001ae0| 75 62 73 63 72 69 62 69 | 6e 67 2c 20 65 74 63 2e |ubscribi|ng, etc.|
|00001af0| 20 20 61 72 65 20 64 6f | 6e 65 20 77 69 74 68 20 | are do|ne with |
|00001b00| 73 70 65 63 69 66 69 63 | 20 54 43 6f 6d 6d 61 6e |specific| TComman|
|00001b10| 64 20 73 75 62 63 6c 61 | 73 73 65 73 20 74 68 61 |d subcla|sses tha|
|00001b20| 74 20 61 72 65 20 62 75 | 69 6c 74 20 69 6e 74 6f |t are bu|ilt into|
|00001b30| 00 00 06 6c 00 09 00 41 | c2 4d 61 63 41 70 70 2e |...l...A|.MacApp.|
|00001b40| 20 20 54 68 65 73 65 20 | 69 6e 63 6c 75 64 65 20 | These |include |
|00001b50| 74 68 65 20 63 6c 61 73 | 73 65 73 20 54 51 75 69 |the clas|ses TQui|
|00001b60| 74 43 6f 6d 6d 61 6e 64 | 2c 20 54 50 72 69 6e 74 |tCommand|, TPrint|
|00001b70| 43 6f 6d 6d 61 6e 64 2c | 20 00 00 00 06 78 00 09 |Command,| ....x..|
|00001b80| 00 48 c2 54 4e 65 77 53 | 75 62 73 63 72 69 62 65 |.H.TNewS|ubscribe|
|00001b90| 72 43 6f 6d 6d 61 6e 64 | 2c 20 54 53 68 6f 77 54 |rCommand|, TShowT|
|00001ba0| 65 61 72 4f 66 66 57 69 | 6e 64 6f 77 43 6f 6d 6d |earOffWi|ndowComm|
|00001bb0| 61 6e 64 2c 20 61 6e 64 | 20 54 45 43 75 74 43 6f |and, and| TECutCo|
|00001bc0| 70 79 43 6f 6d 6d 61 6e | 64 2e 00 00 06 8e 00 aa |pyComman|d.......|
|00001bd0| 00 10 c4 43 6f 6d 6d 61 | 6e 64 73 20 49 6e 20 43 |...Comma|nds In C|
|00001be0| 50 58 00 00 06 ad 00 09 | 00 09 c4 41 70 70 72 6f |PX......|...Appro|
|00001bf0| 61 63 68 00 00 00 06 c3 | 00 24 00 47 c2 54 68 65 |ach.....|.$.G.The|
|00001c00| 20 43 50 58 20 61 70 70 | 72 6f 61 63 68 20 74 6f | CPX app|roach to|
|00001c10| 20 63 6f 6d 6d 61 6e 64 | 73 20 69 73 20 73 6f 6d | command|s is som|
|00001c20| 65 77 68 65 72 65 20 62 | 65 74 77 65 65 6e 20 74 |ewhere b|etween t|
|00001c30| 68 61 74 20 6f 66 20 4d | 61 63 41 70 70 20 32 20 |hat of M|acApp 2 |
|00001c40| 61 6e 64 00 00 00 06 cf | 00 09 00 50 c2 4d 61 63 |and.....|...P.Mac|
|00001c50| 41 70 70 20 33 2e 20 20 | 49 6e 20 43 50 58 20 74 |App 3. |In CPX t|
|00001c60| 68 65 72 65 20 69 73 20 | 61 20 67 6c 6f 62 61 6c |here is |a global|
|00001c70| 20 63 6f 6d 6d 61 6e 64 | 20 61 6e 64 20 65 76 65 | command| and eve|
|00001c80| 6e 74 20 68 61 6e 64 6c | 65 72 20 28 43 6f 6d 6d |nt handl|er (Comm|
|00001c90| 61 6e 64 65 72 29 20 77 | 68 69 63 68 00 00 06 db |ander) w|hich....|
|00001ca0| 00 09 00 51 c2 70 72 6f | 63 65 73 73 65 73 20 63 |...Q.pro|cesses c|
|00001cb0| 6f 6d 6d 61 6e 64 73 20 | 62 79 20 65 78 65 63 75 |ommands |by execu|
|00001cc0| 74 69 6e 67 20 74 68 65 | 69 72 20 44 6f 20 6d 65 |ting the|ir Do me|
|00001cd0| 74 68 6f 64 73 20 61 6e | 64 20 70 72 6f 63 65 73 |thods an|d proces|
|00001ce0| 73 65 73 20 65 76 65 6e | 74 73 20 62 79 20 70 61 |ses even|ts by pa|
|00001cf0| 73 73 69 6e 67 00 00 00 | 06 e7 00 09 00 56 c2 74 |ssing...|.....V.t|
|00001d00| 68 65 6d 20 74 6f 20 61 | 20 73 70 65 63 69 61 6c |hem to a| special|
|00001d10| 20 65 76 65 6e 74 20 68 | 61 6e 64 6c 65 72 20 74 | event h|andler t|
|00001d20| 68 61 74 20 69 74 20 6f | 77 6e 73 2e 20 20 46 69 |hat it o|wns. Fi|
|00001d30| 67 75 72 65 20 33 20 73 | 68 6f 77 73 20 73 6f 6d |gure 3 s|hows som|
|00001d40| 65 20 6f 66 20 74 68 65 | 20 63 6c 61 73 73 65 73 |e of the| classes|
|00001d50| 20 61 6e 64 00 00 06 f3 | 00 09 00 30 c2 6d 65 74 | and....|...0.met|
|00001d60| 68 6f 64 73 20 69 6d 70 | 6f 72 74 61 6e 74 20 74 |hods imp|ortant t|
|00001d70| 6f 20 74 68 65 20 43 50 | 58 20 63 6f 6d 6d 61 6e |o the CP|X comman|
|00001d80| 64 20 68 61 6e 64 6c 69 | 6e 67 2e 20 00 00 08 9a |d handli|ng. ....|
|00001d90| 00 04 00 06 c2 f0 00 84 | 01 ac 00 00 08 b5 00 76 |........|.......v|
|00001da0| 00 2c c6 46 69 67 75 72 | 65 20 33 2e 20 20 54 68 |.,.Figur|e 3. Th|
|00001db0| 65 20 63 6c 61 73 73 65 | 73 2c 20 6d 65 74 68 6f |e classe|s, metho|
|00001dc0| 64 73 2c 20 61 6e 64 20 | 66 69 65 6c 64 73 00 00 |ds, and |fields..|
|00001dd0| 08 c1 00 3f 00 3f c6 74 | 68 61 74 20 70 6c 61 79 |...?.?.t|hat play|
|00001de0| 20 69 6d 70 6f 72 74 61 | 6e 74 20 72 6f 6c 65 73 | importa|nt roles|
|00001df0| 20 69 6e 20 63 6f 6d 6d | 61 6e 64 20 68 61 6e 64 | in comm|and hand|
|00001e00| 6c 69 6e 67 20 69 6e 20 | 50 72 6f 67 72 61 70 68 |ling in |Prograph|
|00001e10| 20 43 50 58 2e 00 00 00 | 08 cd 00 62 00 33 c6 4e | CPX....|...b.3.N|
|00001e20| 6f 74 65 20 74 68 61 74 | 20 50 72 6f 67 72 61 70 |ote that| Prograp|
|00001e30| 68 ff d5 73 20 61 70 70 | 72 6f 61 63 68 20 63 6f |h..s app|roach co|
|00001e40| 6e 74 61 69 6e 73 20 69 | 64 65 61 73 20 66 72 6f |ntains i|deas fro|
|00001e50| 6d 00 00 00 08 d9 00 70 | 00 2b c6 62 6f 74 68 20 |m......p|.+.both |
|00001e60| 74 68 65 20 4d 61 63 41 | 70 70 20 32 20 61 6e 64 |the MacA|pp 2 and|
|00001e70| 20 4d 61 63 41 70 70 20 | 33 20 61 6c 67 6f 72 69 | MacApp |3 algori|
|00001e80| 74 68 6d 73 2e 00 00 00 | 0a 14 00 28 00 06 c2 f0 |thms....|...(....|
|00001e90| 00 85 01 64 00 00 0a 2f | 00 82 00 27 c6 46 69 67 |...d.../|...'.Fig|
|00001ea0| 75 72 65 20 34 2e 20 20 | 54 68 65 20 43 6c 69 63 |ure 4. |The Clic|
|00001eb0| 6b 20 42 65 68 61 76 69 | 6f 72 20 65 64 69 74 6f |k Behavi|or edito|
|00001ec0| 72 2e 20 00 00 00 0a 3b | 00 62 00 34 c6 4e 6f 74 |r. ....;|.b.4.Not|
|00001ed0| 65 20 74 68 61 74 20 74 | 68 69 73 20 61 6c 6c 6f |e that t|his allo|
|00001ee0| 77 73 20 74 68 65 20 70 | 72 6f 67 72 61 6d 6d 65 |ws the p|rogramme|
|00001ef0| 72 20 74 6f 2c 20 69 6e | 20 65 66 66 65 63 74 2c |r to, in| effect,|
|00001f00| 00 00 0a 47 00 93 00 1e | c6 63 75 73 74 6f 6d 20 |...G....|.custom |
|00001f10| 64 65 73 69 67 6e 20 74 | 68 65 20 68 6f 6f 6b 20 |design t|he hook |
|00001f20| 6d 65 74 68 6f 64 00 00 | 0a 53 00 7f 00 28 c6 66 |method..|.S...(.f|
|00001f30| 6f 72 20 74 68 65 20 70 | 72 6f 63 65 73 73 69 6e |or the p|rocessin|
|00001f40| 67 20 6f 66 20 74 68 69 | 73 20 6d 6f 75 73 65 20 |g of thi|s mouse |
|00001f50| 65 76 65 6e 74 2e 00 00 | 0a 6e 00 24 00 4e c2 54 |event...|.n.$.N.T|
|00001f60| 68 65 72 65 20 61 72 65 | 20 6e 6f 20 68 6f 6f 6b |here are| no hook|
|00001f70| 20 6d 65 74 68 6f 64 73 | 20 69 6e 20 43 50 58 20 | methods| in CPX |
|00001f80| 66 6f 72 20 72 65 74 75 | 72 6e 69 6e 67 20 74 68 |for retu|rning th|
|00001f90| 65 20 6e 65 77 6c 79 20 | 69 6e 73 74 61 6e 74 69 |e newly |instanti|
|00001fa0| 61 74 65 64 20 63 6f 6d | 6d 61 6e 64 00 00 0a 7a |ated com|mand...z|
|00001fb0| 00 09 00 4f c2 6f 62 6a | 65 63 74 73 20 74 6f 20 |...O.obj|ects to |
|00001fc0| 74 68 65 20 66 72 61 6d | 65 77 6f 72 6b 2e 20 20 |the fram|ework. |
|00001fd0| 49 6e 73 74 65 61 64 2c | 20 74 68 65 20 63 6f 6d |Instead,| the com|
|00001fe0| 6d 61 6e 64 73 20 61 72 | 65 20 70 6f 73 74 65 64 |mands ar|e posted|
|00001ff0| 2e 20 20 55 6e 6c 69 6b | 65 20 4d 61 63 41 70 70 |. Unlik|e MacApp|
|00002000| 20 33 2c 00 00 00 0a 86 | 00 09 00 53 c2 63 6f 6d | 3,.....|...S.com|
|00002010| 6d 61 6e 64 73 20 63 61 | 6e 20 70 6f 73 74 20 74 |mands ca|n post t|
|00002020| 68 65 6d 73 65 6c 76 65 | 73 2e 20 20 49 6e 20 61 |hemselve|s. In a|
|00002030| 64 64 69 74 69 6f 6e 2c | 20 74 68 65 72 65 20 69 |ddition,| there i|
|00002040| 73 20 6e 6f 20 6e 65 65 | 64 20 66 6f 72 20 68 6f |s no nee|d for ho|
|00002050| 6f 6b 20 6d 65 74 68 6f | 64 73 20 6c 69 6b 65 00 |ok metho|ds like.|
|00002060| 00 00 0a 92 00 09 00 54 | c2 74 68 6f 73 65 20 69 |.......T|.those i|
|00002070| 6e 20 4d 61 63 41 70 70 | 20 33 2c 20 73 69 6e 63 |n MacApp| 3, sinc|
|00002080| 65 20 74 68 65 20 42 65 | 68 61 76 69 6f 72 20 6d |e the Be|havior m|
|00002090| 65 63 68 61 6e 69 73 6d | 20 69 6e 20 43 50 58 20 |echanism| in CPX |
|000020a0| 70 72 6f 76 69 64 65 73 | 20 61 20 77 61 79 20 66 |provides| a way f|
|000020b0| 6f 72 20 79 6f 75 72 20 | 63 6f 64 65 00 00 0a 9e |or your |code....|
|000020c0| 00 09 00 59 c2 74 6f 20 | 67 65 74 20 63 6f 6e 74 |...Y.to |get cont|
|000020d0| 72 6f 6c 20 77 68 65 6e | 20 61 20 75 73 65 72 20 |rol when| a user |
|000020e0| 65 76 65 6e 74 20 6c 69 | 6b 65 20 63 68 6f 6f 73 |event li|ke choos|
|000020f0| 69 6e 67 20 61 20 6d 65 | 6e 75 20 69 74 65 6d 20 |ing a me|nu item |
|00002100| 6f 72 20 63 6c 69 63 6b | 69 6e 67 20 69 6e 20 61 |or click|ing in a|
|00002110| 20 76 69 65 77 20 6f 63 | 63 75 72 73 2e 00 00 00 | view oc|curs....|
|00002120| 0a aa 00 09 00 58 c2 49 | 6e 20 66 61 63 74 2c 20 |.....X.I|n fact, |
|00002130| 74 68 65 20 42 65 68 61 | 76 69 6f 72 20 65 64 69 |the Beha|vior edi|
|00002140| 74 6f 72 20 63 61 6e 20 | 72 65 64 75 63 65 20 74 |tor can |reduce t|
|00002150| 68 65 20 6e 65 65 64 20 | 66 6f 72 20 73 6f 6d 65 |he need |for some|
|00002160| 20 6f 66 20 74 68 65 20 | 63 6f 64 65 20 79 6f 75 | of the |code you|
|00002170| 20 77 6f 75 6c 64 20 68 | 61 76 65 20 74 6f 00 00 | would h|ave to..|
|00002180| 0a b6 00 09 00 54 c2 68 | 61 76 65 20 77 72 69 74 |.....T.h|ave writ|
|00002190| 74 65 6e 20 69 6e 20 61 | 20 4d 61 63 41 70 70 20 |ten in a| MacApp |
|000021a0| 69 6d 70 6c 65 6d 65 6e | 74 61 74 69 6f 6e 2c 20 |implemen|tation, |
|000021b0| 61 6e 64 20 69 6e 20 73 | 6f 6d 65 20 73 69 6d 70 |and in s|ome simp|
|000021c0| 6c 65 20 63 61 73 65 73 | 2c 20 63 61 6e 20 65 76 |le cases|, can ev|
|000021d0| 65 6e 20 6f 62 76 69 61 | 74 65 00 00 0a c2 00 09 |en obvia|te......|
|000021e0| 00 5a c2 74 68 65 20 6e | 65 65 64 20 66 6f 72 20 |.Z.the n|eed for |
|000021f0| 61 6e 79 20 63 6f 64 65 | 20 61 74 20 61 6c 6c 2e |any code| at all.|
|00002200| 20 20 46 69 67 75 72 65 | 20 34 20 73 68 6f 77 73 | Figure| 4 shows|
|00002210| 20 74 68 65 20 43 6c 69 | 63 6b 20 42 65 68 61 76 | the Cli|ck Behav|
|00002220| 69 6f 72 20 65 64 69 74 | 6f 72 20 66 6f 72 20 61 |ior edit|or for a|
|00002230| 20 76 69 65 77 2e 20 20 | 57 68 61 74 00 00 0a ce | view. |What....|
|00002240| 00 09 00 59 c2 74 68 69 | 73 20 65 64 69 74 6f 72 |...Y.thi|s editor|
|00002250| 20 65 6e 61 62 6c 65 73 | 20 74 68 65 20 70 72 6f | enables| the pro|
|00002260| 67 72 61 6d 6d 65 72 20 | 74 6f 20 64 6f 20 69 73 |grammer |to do is|
|00002270| 2c 20 69 6e 20 65 66 66 | 65 63 74 2c 20 74 6f 20 |, in eff|ect, to |
|00002280| 63 75 73 74 6f 6d 20 64 | 65 73 69 67 6e 20 74 68 |custom d|esign th|
|00002290| 65 20 68 6f 6f 6b 20 6d | 65 74 68 6f 64 00 00 00 |e hook m|ethod...|
|000022a0| 0a da 00 09 00 5a c2 74 | 6f 20 62 65 20 75 73 65 |.....Z.t|o be use|
|000022b0| 64 20 69 6e 20 65 78 61 | 63 74 6c 79 20 74 68 69 |d in exa|ctly thi|
|000022c0| 73 20 73 69 74 75 61 74 | 69 6f 6e 2e 20 20 41 73 |s situat|ion. As|
|000022d0| 20 70 61 72 74 20 6f 66 | 20 74 68 65 20 73 70 65 | part of| the spe|
|000022e0| 63 69 66 69 63 61 74 69 | 6f 6e 20 6f 66 20 74 68 |cificati|on of th|
|000022f0| 69 73 20 62 65 68 61 76 | 69 6f 72 2c 20 79 6f 75 |is behav|ior, you|
|00002300| 00 00 0a e6 00 09 00 52 | c2 63 61 6e 20 68 61 76 |.......R|.can hav|
|00002310| 65 20 61 6e 20 69 6e 73 | 74 61 6e 63 65 20 6f 66 |e an ins|tance of|
|00002320| 20 61 6e 79 20 63 6c 61 | 73 73 20 61 6c 6c 6f 63 | any cla|ss alloc|
|00002330| 61 74 65 64 2c 20 6f 72 | 20 68 61 76 65 20 74 68 |ated, or| have th|
|00002340| 65 20 76 61 6c 75 65 20 | 6f 66 20 61 6e 79 20 77 |e value |of any w|
|00002350| 69 6e 64 6f 77 20 69 74 | 65 6d 00 00 0a f2 00 09 |indow it|em......|
|00002360| 00 23 c2 6f 62 74 61 69 | 6e 65 64 2c 20 61 6d 6f |.#.obtai|ned, amo|
|00002370| 6e 67 20 6d 61 6e 79 20 | 6f 74 68 65 72 20 74 68 |ng many |other th|
|00002380| 69 6e 67 73 2e 00 00 00 | 0c 1f 00 04 00 06 c2 f0 |ings....|........|
|00002390| 00 86 01 ac 00 00 0c 3a | 00 54 00 37 c6 46 69 67 |.......:|.T.7.Fig|
|000023a0| 75 72 65 20 35 2e 20 20 | 54 68 65 20 62 61 73 69 |ure 5. |The basi|
|000023b0| 63 20 63 6f 6d 6d 61 6e | 64 20 70 72 6f 63 65 73 |c comman|d proces|
|000023c0| 73 69 6e 67 20 6d 65 74 | 68 6f 64 20 69 6e 20 43 |sing met|hod in C|
|000023d0| 50 58 2e 00 00 00 0c 46 | 00 27 00 4a c6 28 54 68 |PX.....F|.'.J.(Th|
|000023e0| 65 20 63 6f 6d 6d 65 6e | 74 73 20 68 61 76 65 20 |e commen|ts have |
|000023f0| 62 65 65 6e 20 61 64 64 | 65 64 20 61 6e 64 20 74 |been add|ed and t|
|00002400| 68 65 20 6e 61 6d 65 73 | 20 6f 66 20 73 6f 6d 65 |he names| of some|
|00002410| 20 6f 66 20 74 68 65 20 | 6c 6f 63 61 6c 73 20 63 | of the |locals c|
|00002420| 68 61 6e 67 65 64 00 00 | 0c 52 00 7b 00 2a c6 74 |hanged..|.R.{.*.t|
|00002430| 6f 20 6d 61 6b 65 20 74 | 68 65 73 65 20 63 6c 65 |o make t|hese cle|
|00002440| 61 72 65 72 20 61 73 20 | 73 74 61 74 69 63 20 66 |arer as |static f|
|00002450| 69 67 75 72 65 73 2e 29 | 00 00 0c 6d 00 24 00 4c |igures.)|...m.$.L|
|00002460| c2 49 6e 20 43 50 58 2c | 20 70 6f 73 74 69 6e 67 |.In CPX,| posting|
|00002470| 20 61 6e 20 6f 72 64 69 | 6e 61 72 79 20 63 6f 6d | an ordi|nary com|
|00002480| 6d 61 6e 64 20 64 6f 65 | 73 20 6e 6f 74 20 65 6e |mand doe|s not en|
|00002490| 74 65 72 20 69 74 20 69 | 6e 74 6f 20 61 20 6c 69 |ter it i|nto a li|
|000024a0| 73 74 20 66 6f 72 20 6c | 61 74 65 72 00 00 0c 79 |st for l|ater...y|
|000024b0| 00 09 00 51 c2 70 72 6f | 63 65 73 73 69 6e 67 2c |...Q.pro|cessing,|
|000024c0| 20 62 75 74 20 72 61 74 | 68 65 72 20 69 6d 6d 65 | but rat|her imme|
|000024d0| 64 69 61 74 65 6c 79 20 | 63 61 75 73 65 73 20 74 |diately |causes t|
|000024e0| 68 65 20 43 6f 6d 6d 61 | 6e 64 65 72 20 74 6f 20 |he Comma|nder to |
|000024f0| 65 78 65 63 75 74 65 20 | 74 68 65 20 63 6f 6d 6d |execute |the comm|
|00002500| 61 6e 64 2e 20 00 00 00 | 0c 85 00 09 00 55 c2 54 |and. ...|.....U.T|
|00002510| 68 65 72 65 20 61 72 65 | 20 73 70 65 63 69 61 6c |here are| special|
|00002520| 20 73 75 62 63 6c 61 73 | 73 65 73 20 6f 66 20 43 | subclas|ses of C|
|00002530| 6f 6d 6d 61 6e 64 2c 20 | 44 65 66 65 72 72 65 64 |ommand, |Deferred|
|00002540| 20 54 61 73 6b 20 61 6e | 64 20 50 65 72 69 6f 64 | Task an|d Period|
|00002550| 69 63 20 54 61 73 6b 2c | 20 77 68 69 63 68 20 77 |ic Task,| which w|
|00002560| 69 6c 6c 00 00 00 0c 91 | 00 09 00 53 c2 64 65 6c |ill.....|...S.del|
|00002570| 61 79 20 6f 72 20 72 65 | 70 65 61 74 20 74 68 65 |ay or re|peat the|
|00002580| 20 65 78 65 63 75 74 69 | 6f 6e 20 6f 66 20 74 68 | executi|on of th|
|00002590| 65 20 63 6f 6d 6d 61 6e | 64 2e 20 20 46 69 67 75 |e comman|d. Figu|
|000025a0| 72 65 20 35 20 73 68 6f | 77 73 20 73 6f 6d 65 20 |re 5 sho|ws some |
|000025b0| 6f 66 20 74 68 65 20 50 | 72 6f 67 72 61 70 68 00 |of the P|rograph.|
|000025c0| 00 00 0c 9d 00 09 00 39 | c2 63 6f 64 65 20 66 72 |.......9|.code fr|
|000025d0| 6f 6d 20 74 68 65 20 41 | 42 43 20 63 6c 61 73 73 |om the A|BC class|
|000025e0| 20 6c 69 62 72 61 72 79 | 20 66 6f 72 20 63 6f 6d | library| for com|
|000025f0| 6d 61 6e 64 20 70 72 6f | 63 65 73 73 69 6e 67 2e |mand pro|cessing.|
|00002600| 20 00 00 00 0c ae 00 24 | 00 48 c2 50 65 72 69 6f | ......$|.H.Perio|
|00002610| 64 69 63 20 54 61 73 6b | 2c 20 61 20 73 75 62 63 |dic Task|, a subc|
|00002620| 6c 61 73 73 20 6f 66 20 | 43 6f 6d 6d 61 6e 64 2c |lass of |Command,|
|00002630| 20 69 73 20 74 68 65 20 | 6d 65 63 68 61 6e 69 73 | is the |mechanis|
|00002640| 6d 20 66 6f 72 20 70 65 | 72 66 6f 72 6d 69 6e 67 |m for pe|rforming|
|00002650| 20 61 00 00 0c ba 00 09 | 00 58 c2 72 65 63 75 72 | a......|.X.recur|
|00002660| 72 69 6e 67 20 61 63 74 | 69 76 69 74 79 20 6f 72 |ring act|ivity or|
|00002670| 20 70 72 6f 63 65 73 73 | 69 6e 67 20 64 75 72 69 | process|ing duri|
|00002680| 6e 67 20 69 64 6c 65 20 | 74 69 6d 65 2e 20 20 54 |ng idle |time. T|
|00002690| 68 65 72 65 20 69 73 20 | 6e 6f 20 75 73 65 20 6f |here is |no use o|
|000026a0| 66 20 50 65 72 69 6f 64 | 69 63 20 54 61 73 6b 20 |f Period|ic Task |
|000026b0| 69 6e 00 00 0c c6 00 09 | 00 51 c2 4d 69 6e 69 51 |in......|.Q.MiniQ|
|000026c0| 75 61 64 57 6f 72 6c 64 | 2b 2c 20 62 75 74 20 74 |uadWorld|+, but t|
|000026d0| 68 65 20 50 72 6f 67 72 | 61 70 68 20 69 6d 70 6c |he Progr|aph impl|
|000026e0| 65 6d 65 6e 74 61 74 69 | 6f 6e 20 6f 66 20 74 68 |ementati|on of th|
|000026f0| 65 20 4d 61 63 41 70 70 | 20 44 65 6d 6f 44 69 61 |e MacApp| DemoDia|
|00002700| 6c 6f 67 73 20 73 61 6d | 70 6c 65 00 00 00 0c d2 |logs sam|ple.....|
|00002710| 00 09 00 54 c2 70 72 6f | 67 72 61 6d 20 75 73 65 |...T.pro|gram use|
|00002720| 73 20 50 65 72 69 6f 64 | 69 63 20 54 61 73 6b 73 |s Period|ic Tasks|
|00002730| 20 74 6f 20 72 65 66 72 | 65 73 68 20 74 68 65 20 | to refr|esh the |
|00002740| 76 69 65 77 20 61 6e 64 | 20 74 61 72 67 65 74 20 |view and| target |
|00002750| 69 6e 73 70 65 63 74 6f | 72 20 77 69 6e 64 6f 77 |inspecto|r window|
|00002760| 73 2e 20 20 28 43 50 58 | 00 00 0c de 00 09 00 4a |s. (CPX|.......J|
|00002770| c2 44 65 6d 6f 44 69 61 | 6c 6f 67 73 20 77 61 73 |.DemoDia|logs was|
|00002780| 20 64 65 73 63 72 69 62 | 65 64 20 69 6e 20 74 68 | describ|ed in th|
|00002790| 65 20 4d 61 72 63 68 2f | 41 70 72 69 6c 20 ff d4 |e March/|April ..|
|000027a0| 39 34 20 69 73 73 75 65 | 20 6f 66 20 c6 46 72 61 |94 issue| of .Fra|
|000027b0| 6d 65 57 6f 72 6b 73 c2 | 29 2e 00 00 0c ef 00 24 |meWorks.|)......$|
|000027c0| 00 4f c2 55 6e 6c 69 6b | 65 20 4d 61 63 41 70 70 |.O.Unlik|e MacApp|
|000027d0| 2c 20 50 72 6f 67 72 61 | 70 68 20 63 6c 61 73 73 |, Progra|ph class|
|000027e0| 20 6c 69 62 72 61 72 79 | 20 69 74 73 65 6c 66 20 | library| itself |
|000027f0| 64 6f 65 73 6e ff d5 74 | 20 75 73 65 20 63 6f 6d |doesn..t| use com|
|00002800| 6d 61 6e 64 73 20 76 65 | 72 79 20 6d 75 63 68 2e |mands ve|ry much.|
|00002810| 20 00 00 00 0c fb 00 09 | 00 57 c2 46 65 61 74 75 | .......|.W.Featu|
|00002820| 72 65 73 20 6c 69 6b 65 | 20 70 72 69 6e 74 69 6e |res like| printin|
|00002830| 67 2c 20 63 6c 6f 73 69 | 6e 67 20 77 69 6e 64 6f |g, closi|ng windo|
|00002840| 77 73 2c 20 61 6e 64 20 | 71 75 69 74 74 69 6e 67 |ws, and |quitting|
|00002850| 20 74 68 65 20 61 70 70 | 6c 69 63 61 74 69 6f 6e | the app|lication|
|00002860| 2c 20 65 74 63 2e 20 20 | 66 6f 72 20 77 68 69 63 |, etc. |for whic|
|00002870| 68 00 00 00 0d 07 00 09 | 00 51 c2 4d 61 63 41 70 |h.......|.Q.MacAp|
|00002880| 70 20 68 61 73 20 61 20 | 73 70 65 63 69 66 69 63 |p has a |specific|
|00002890| 20 54 43 6f 6d 6d 61 6e | 64 20 73 75 62 63 6c 61 | TComman|d subcla|
|000028a0| 73 73 2c 20 43 50 58 20 | 6a 75 73 74 20 75 73 65 |ss, CPX |just use|
|000028b0| 73 20 69 74 73 20 62 65 | 68 61 76 69 6f 72 20 6d |s its be|havior m|
|000028c0| 65 63 68 61 6e 69 73 6d | 20 74 6f 00 00 00 0d 13 |echanism| to.....|
|000028d0| 00 09 00 51 c2 70 65 72 | 66 6f 72 6d 20 64 69 72 |...Q.per|form dir|
|000028e0| 65 63 74 6c 79 2e 20 20 | 46 6f 72 20 65 78 61 6d |ectly. |For exam|
|000028f0| 70 6c 65 2c 20 69 6e 20 | 4d 61 63 41 70 70 20 32 |ple, in |MacApp 2|
|00002900| 2c 20 63 6c 6f 73 69 6e | 67 20 61 20 77 69 6e 64 |, closin|g a wind|
|00002910| 6f 77 20 76 69 61 20 74 | 68 65 20 43 6c 6f 73 65 |ow via t|he Close|
|00002920| 20 6d 65 6e 75 00 00 00 | 0d 1f 00 09 00 50 c2 69 | menu...|.....P.i|
|00002930| 74 65 6d 20 69 73 20 61 | 63 63 6f 6d 70 6c 69 73 |tem is a|ccomplis|
|00002940| 68 65 64 20 61 73 20 66 | 6f 6c 6c 6f 77 73 3a 20 |hed as f|ollows: |
|00002950| 54 57 69 6e 64 6f 77 2e | 44 6f 4d 65 6e 75 43 6f |TWindow.|DoMenuCo|
|00002960| 6d 6d 61 6e 64 20 69 73 | 20 63 61 6c 6c 65 64 20 |mmand is| called |
|00002970| 62 79 20 4d 61 63 41 70 | 70 20 77 69 74 68 00 00 |by MacAp|p with..|
|00002980| 0d 2b 00 09 00 54 c2 74 | 68 65 20 70 61 72 61 6d |.+...T.t|he param|
|00002990| 65 74 65 72 20 63 43 6c | 6f 73 65 2e 20 20 54 68 |eter cCl|ose. Th|
|000029a0| 69 73 20 61 6c 6c 6f 63 | 61 74 65 73 20 61 20 54 |is alloc|ates a T|
|000029b0| 43 6c 6f 73 65 57 69 6e | 64 6f 77 43 6f 6d 6d 61 |CloseWin|dowComma|
|000029c0| 6e 64 20 6f 62 6a 65 63 | 74 2c 20 69 6e 69 74 69 |nd objec|t, initi|
|000029d0| 61 6c 69 7a 65 73 20 69 | 74 2c 00 00 0d 37 00 09 |alizes i|t,...7..|
|000029e0| 00 57 c2 61 6e 64 20 74 | 68 65 6e 20 72 65 74 75 |.W.and t|hen retu|
|000029f0| 72 6e 73 20 69 74 20 74 | 6f 20 4d 61 63 41 70 70 |rns it t|o MacApp|
|00002a00| 2e 20 20 4d 61 63 41 70 | 70 20 63 61 6c 6c 73 20 |. MacAp|p calls |
|00002a10| 74 68 65 20 63 6f 6d 6d | 61 6e 64 20 6f 62 6a 65 |the comm|and obje|
|00002a20| 63 74 ff d5 73 20 44 6f | 49 74 20 6d 65 74 68 6f |ct..s Do|It metho|
|00002a30| 64 20 74 6f 20 74 65 6c | 6c 00 00 00 0d 43 00 09 |d to tel|l....C..|
|00002a40| 00 59 c2 74 68 65 20 77 | 69 6e 64 6f 77 ff d5 73 |.Y.the w|indow..s|
|00002a50| 20 6d 61 69 6e 20 76 69 | 65 77 20 74 6f 20 43 6c | main vi|ew to Cl|
|00002a60| 6f 73 65 2e 20 20 54 68 | 69 73 20 65 76 65 6e 74 |ose. Th|is event|
|00002a70| 75 61 6c 6c 79 20 63 61 | 75 73 65 73 20 74 68 65 |ually ca|uses the|
|00002a80| 20 77 69 6e 64 6f 77 2c | 20 69 74 73 20 64 6f 63 | window,| its doc|
|00002a90| 75 6d 65 6e 74 2c 20 65 | 74 63 2e 00 00 00 0d 4f |ument, e|tc.....O|
|00002aa0| 00 09 00 26 c2 74 6f 20 | 63 6c 6f 73 65 2e 20 20 |...&.to |close. |
|00002ab0| 48 65 72 65 20 69 73 20 | 74 68 65 20 4d 61 63 41 |Here is |the MacA|
|00002ac0| 70 70 20 32 20 63 6f 64 | 65 3a 00 00 0d 6b 00 ff |pp 2 cod|e:...k..|
|00002ad0| 00 17 af c8 54 57 69 6e | 64 6f 77 2e 44 6f 4d 65 |....TWin|dow.DoMe|
|00002ae0| 6e 75 43 6f 6d 6d 61 6e | 64 00 00 00 0d 81 00 12 |nuComman|d.......|
|00002af0| 00 20 c7 46 55 4e 43 54 | 49 4f 4e 20 54 57 69 6e |. .FUNCT|ION TWin|
|00002b00| 64 6f 77 2e 44 6f 4d 65 | 6e 75 43 6f 6d 6d 61 6e |dow.DoMe|nuComman|
|00002b10| 64 28 00 00 0d 8c 00 af | 00 22 c7 61 43 6d 64 4e |d(......|.".aCmdN|
|00002b20| 75 6d 62 65 72 3a 20 43 | 6d 64 4e 75 6d 62 65 72 |umber: C|mdNumber|
|00002b30| 29 3a 20 54 43 6f 6d 6d | 61 6e 64 3b 00 00 0d 97 |): TComm|and;....|
|00002b40| 00 12 00 0a c7 4f 56 45 | 52 52 49 44 45 3b 00 00 |.....OVE|RRIDE;..|
|00002b50| 0d a2 00 12 00 04 c7 56 | 41 52 00 00 0d ad 00 1b |.......V|AR......|
|00002b60| 00 2a c7 61 43 6c 6f 73 | 65 57 69 6e 64 6f 77 43 |.*.aClos|eWindowC|
|00002b70| 6f 6d 6d 61 6e 64 3a 20 | 54 43 6c 6f 73 65 57 69 |ommand: |TCloseWi|
|00002b80| 6e 64 6f 77 43 6f 6d 6d | 61 6e 64 3b 00 00 0d b8 |ndowComm|and;....|
|00002b90| 00 1b 00 18 c7 6f 6c 64 | 4f 62 6a 65 63 74 50 65 |.....old|ObjectPe|
|00002ba0| 72 6d 3a 98 42 4f 4f 4c | 45 41 4e 3b 00 00 0d c3 |rm:.BOOL|EAN;....|
|00002bb0| 00 12 00 06 c7 42 45 47 | 49 4e 00 00 0d ce 00 1b |.....BEG|IN......|
|00002bc0| 00 16 c7 44 6f 4d 65 6e | 75 43 6f 6d 6d 61 6e 64 |...DoMen|uCommand|
|00002bd0| 20 3a 3d 20 4e 49 4c 3b | 00 00 0d d9 00 12 00 01 | := NIL;|........|
|00002be0| c7 00 00 00 0d ef 00 1b | 00 13 c7 43 41 53 45 20 |........|...CASE |
|00002bf0| 61 43 6d 64 4e 75 6d 62 | 65 72 20 4f 46 00 00 00 |aCmdNumb|er OF...|
|00002c00| 0d fa 00 28 00 08 c7 63 | 43 6c 6f 73 65 3a 00 00 |...(...c|Close:..|
|00002c10| 0e 05 00 36 00 06 c7 42 | 45 47 49 4e 00 00 0e 10 |...6...B|EGIN....|
|00002c20| 00 43 00 31 c7 6f 6c 64 | 4f 62 6a 65 63 74 50 65 |.C.1.old|ObjectPe|
|00002c30| 72 6d 20 3a 3d 20 41 6c | 6c 6f 63 61 74 65 4f 62 |rm := Al|locateOb|
|00002c40| 6a 65 63 74 73 46 72 6f | 6d 50 65 72 6d 28 46 41 |jectsFro|mPerm(FA|
|00002c50| 4c 53 45 29 3b 00 00 00 | 0e 1b 00 43 00 1a c7 4e |LSE);...|...C...N|
|00002c60| 65 77 28 61 43 6c 6f 73 | 65 57 69 6e 64 6f 77 43 |ew(aClos|eWindowC|
|00002c70| 6f 6d 6d 61 6e 64 29 3b | 00 00 0e 26 00 43 00 30 |ommand);|...&.C.0|
|00002c80| c7 49 46 20 41 6c 6c 6f | 63 61 74 65 4f 62 6a 65 |.IF Allo|cateObje|
|00002c90| 63 74 73 46 72 6f 6d 50 | 65 72 6d 28 6f 6c 64 4f |ctsFromP|erm(oldO|
|00002ca0| 62 6a 65 63 74 50 65 72 | 6d 29 20 54 48 45 4e 3b |bjectPer|m) THEN;|
|00002cb0| 00 00 0e 31 00 43 00 31 | c7 46 61 69 6c 4e 69 6c |...1.C.1|.FailNil|
|00002cc0| 28 61 43 6c 6f 73 65 57 | 69 6e 64 6f 77 43 6f 6d |(aCloseW|indowCom|
|00002cd0| 6d 61 6e 64 29 3b 80 01 | 44 7b 20 6a 75 73 74 20 |mand);..|D{ just |
|00002ce0| 69 6e 20 63 61 73 65 20 | 7d 00 00 00 0e 3c 00 43 |in case |}....<.C|
|00002cf0| 00 34 c7 61 43 6c 6f 73 | 65 57 69 6e 64 6f 77 43 |.4.aClos|eWindowC|
|00002d00| 6f 6d 6d 61 6e 64 2e 49 | 43 6c 6f 73 65 57 69 6e |ommand.I|CloseWin|
|00002d10| 64 6f 77 43 6f 6d 6d 61 | 6e 64 28 61 43 6d 64 4e |dowComma|nd(aCmdN|
|00002d20| 75 6d 62 65 72 2c 00 00 | 0e 47 00 12 00 08 c7 89 |umber,..|.G......|
|00002d30| 53 45 4c 46 29 3b 00 00 | 0e 52 00 43 00 26 c7 44 |SELF);..|.R.C.&.D|
|00002d40| 6f 4d 65 6e 75 43 6f 6d | 6d 61 6e 64 20 3a 3d 20 |oMenuCom|mand := |
|00002d50| 61 43 6c 6f 73 65 57 69 | 6e 64 6f 77 43 6f 6d 6d |aCloseWi|ndowComm|
|00002d60| 61 6e 64 3b 00 00 0e 5d | 00 36 00 05 c7 45 4e 44 |and;...]|.6...END|
|00002d70| 3b 00 00 00 0e 68 00 28 | 00 0a c7 4f 54 48 45 52 |;....h.(|...OTHER|
|00002d80| 57 49 53 45 00 00 0e 73 | 00 36 00 36 c7 44 6f 4d |WISE...s|.6.6.DoM|
|00002d90| 65 6e 75 43 6f 6d 6d 61 | 6e 64 20 3a 3d 20 49 4e |enuComma|nd := IN|
|00002da0| 48 45 52 49 54 45 44 20 | 44 6f 4d 65 6e 75 43 6f |HERITED |DoMenuCo|
|00002db0| 6d 6d 61 6e 64 28 61 43 | 6d 64 4e 75 6d 62 65 72 |mmand(aC|mdNumber|
|00002dc0| 29 3b 00 00 0e 7e 00 1b | 00 05 c7 45 4e 44 3b 00 |);...~..|...END;.|
|00002dd0| 00 00 0e 89 00 12 00 05 | c7 45 4e 44 3b 00 00 00 |........|.END;...|
|00002de0| 0e 94 00 12 00 01 c7 00 | 00 00 0e c6 00 ff 00 1a |........|........|
|00002df0| aa c8 54 43 6c 6f 73 65 | 57 69 6e 64 6f 77 43 6f |..TClose|WindowCo|
|00002e00| 6d 6d 61 6e 64 2e 44 6f | 49 74 00 00 0e dc 00 12 |mmand.Do|It......|
|00002e10| 00 24 c7 50 52 4f 43 45 | 44 55 52 45 20 54 43 6c |.$.PROCE|DURE TCl|
|00002e20| 6f 73 65 57 69 6e 64 6f | 77 43 6f 6d 6d 61 6e 64 |oseWindo|wCommand|
|00002e30| 2e 44 6f 49 74 3b 00 00 | 0e e7 00 12 00 06 c7 42 |.DoIt;..|.......B|
|00002e40| 45 47 49 4e 00 00 0e f2 | 00 1b 00 15 c7 49 46 20 |EGIN....|.....IF |
|00002e50| 66 56 69 65 77 20 3c 3e | 20 4e 49 4c 20 54 48 45 |fView <>| NIL THE|
|00002e60| 4e 00 00 00 0e fd 00 28 | 00 1c c7 54 57 69 6e 64 |N......(|...TWind|
|00002e70| 6f 77 28 66 56 69 65 77 | 29 2e 43 6c 6f 73 65 42 |ow(fView|).CloseB|
|00002e80| 79 55 73 65 72 3b 00 00 | 0f 08 00 12 00 05 c7 45 |yUser;..|.......E|
|00002e90| 4e 44 3b 00 00 00 0f 13 | 00 12 00 01 c7 00 00 00 |ND;.....|........|
|00002ea0| 0f 2f 00 24 00 4f c2 54 | 68 65 20 63 6f 72 72 65 |./.$.O.T|he corre|
|00002eb0| 73 70 6f 6e 64 69 6e 67 | 20 66 75 6e 63 74 69 6f |sponding| functio|
|00002ec0| 6e 61 6c 69 74 79 20 69 | 6e 20 43 50 58 20 69 73 |nality i|n CPX is|
|00002ed0| 20 69 6d 70 6c 65 6d 65 | 6e 74 65 64 20 77 69 74 | impleme|nted wit|
|00002ee0| 68 20 61 20 62 65 68 61 | 76 69 6f 72 2e 20 20 46 |h a beha|vior. F|
|00002ef0| 69 67 75 72 65 00 00 00 | 0f 3b 00 09 00 58 c2 36 |igure...|.;...X.6|
|00002f00| 20 73 68 6f 77 73 20 74 | 68 65 20 73 70 65 63 69 | shows t|he speci|
|00002f10| 66 69 63 61 74 69 6f 6e | 20 6f 66 20 74 68 69 73 |fication| of this|
|00002f20| 20 6d 65 6e 75 20 62 65 | 68 61 76 69 6f 72 2c 20 | menu be|havior, |
|00002f30| 61 6e 64 20 74 68 65 20 | 63 6f 64 65 20 74 68 61 |and the |code tha|
|00002f40| 74 20 69 74 20 63 61 6c | 6c 73 2e 20 20 53 69 6e |t it cal|ls. Sin|
|00002f50| 63 65 20 74 68 65 00 00 | 0f 47 00 09 00 4d c2 4d |ce the..|.G...M.M|
|00002f60| 61 63 41 70 70 20 54 43 | 6c 6f 73 65 57 69 6e 64 |acApp TC|loseWind|
|00002f70| 6f 77 43 6f 6d 6d 61 6e | 64 20 69 73 20 6e 6f 74 |owComman|d is not|
|00002f80| 20 61 6e 20 75 6e 64 6f | 61 62 6c 65 20 63 6f 6d | an undo|able com|
|00002f90| 6d 61 6e 64 2c 20 74 68 | 65 72 65 20 69 73 6e ff |mand, th|ere isn.|
|00002fa0| d5 74 20 74 6f 6f 20 6d | 75 63 68 00 00 00 0f 53 |.t too m|uch....S|
|00002fb0| 00 09 00 3e c2 64 69 66 | 66 65 72 65 6e 63 65 20 |...>.dif|ference |
|00002fc0| 69 6e 20 74 68 65 20 72 | 65 61 6c 20 66 75 6e 63 |in the r|eal func|
|00002fd0| 74 69 6f 6e 61 6c 69 74 | 79 20 6f 66 20 74 68 65 |tionalit|y of the|
|00002fe0| 73 65 20 74 77 6f 20 61 | 70 70 72 6f 61 63 68 65 |se two a|pproache|
|00002ff0| 73 2e 00 00 11 73 00 28 | 00 06 c2 f0 00 87 01 64 |s....s.(|.......d|
|00003000| 00 00 11 8e 00 11 00 53 | c6 46 69 67 75 72 65 20 |.......S|.Figure |
|00003010| 36 2e 20 20 54 68 65 20 | 69 6d 70 6c 65 6d 65 6e |6. The |implemen|
|00003020| 74 61 74 69 6f 6e 20 6f | 66 20 74 68 65 20 77 69 |tation o|f the wi|
|00003030| 6e 64 6f 77 20 63 6c 6f | 73 69 6e 67 20 66 75 6e |ndow clo|sing fun|
|00003040| 63 74 69 6f 6e 61 6c 69 | 74 79 20 69 6e 20 50 72 |ctionali|ty in Pr|
|00003050| 6f 67 72 61 70 68 20 43 | 50 58 2e 00 00 00 11 9a |ograph C|PX......|
|00003060| 00 70 00 2e c6 4e 6f 74 | 65 20 74 68 61 74 20 74 |.p...Not|e that t|
|00003070| 68 69 73 20 64 6f 65 73 | 20 6e 6f 74 20 75 73 65 |his does| not use|
|00003080| 20 61 20 63 6f 6d 6d 61 | 6e 64 20 6f 62 6a 65 63 | a comma|nd objec|
|00003090| 74 2e 00 00 11 ba 00 67 | 00 25 c4 49 6d 70 6c 65 |t......g|.%.Imple|
|000030a0| 6d 65 6e 74 69 6e 67 20 | 53 6f 6d 65 20 43 6f 6d |menting |Some Com|
|000030b0| 6d 61 6e 64 20 53 75 62 | 63 6c 61 73 73 65 73 00 |mand Sub|classes.|
|000030c0| 00 00 11 d0 00 09 00 55 | c2 49 20 69 6d 70 6c 65 |.......U|.I imple|
|000030d0| 6d 65 6e 74 65 64 20 61 | 20 76 65 72 79 20 73 6d |mented a| very sm|
|000030e0| 61 6c 6c 20 73 61 6d 70 | 6c 65 20 61 70 70 20 74 |all samp|le app t|
|000030f0| 68 61 74 20 63 6f 6e 74 | 61 69 6e 73 20 74 68 72 |hat cont|ains thr|
|00003100| 65 65 20 63 6f 6d 6d 61 | 6e 64 20 63 6c 61 73 73 |ee comma|nd class|
|00003110| 65 73 2e 20 20 54 68 65 | 20 61 70 70 2c 00 00 00 |es. The| app,...|
|00003120| 11 dc 00 09 00 56 c2 4d | 69 6e 69 51 75 61 64 57 |.....V.M|iniQuadW|
|00003130| 6f 72 6c 64 2b 2c 20 69 | 73 20 61 20 73 6c 69 67 |orld+, i|s a slig|
|00003140| 68 74 20 65 78 74 65 6e | 73 69 6f 6e 20 6f 66 20 |ht exten|sion of |
|00003150| 74 68 65 20 4d 69 6e 69 | 51 75 61 64 57 6f 72 6c |the Mini|QuadWorl|
|00003160| 64 20 61 70 70 20 74 68 | 61 74 20 49 20 64 69 64 |d app th|at I did|
|00003170| 20 79 65 61 72 73 20 61 | 67 6f 2e 20 00 00 11 e8 | years a|go. ....|
|00003180| 00 09 00 57 c2 54 68 69 | 73 20 61 70 70 20 6d 65 |...W.Thi|s app me|
|00003190| 72 65 6c 79 20 64 69 73 | 70 6c 61 79 73 20 66 69 |rely dis|plays fi|
|000031a0| 76 65 20 71 75 61 64 72 | 69 6c 61 74 65 72 61 6c |ve quadr|ilateral|
|000031b0| 73 20 61 6e 64 20 65 6e | 61 62 6c 65 73 20 74 68 |s and en|ables th|
|000031c0| 65 20 75 73 65 72 20 74 | 6f 20 73 65 6c 65 63 74 |e user t|o select|
|000031d0| 20 61 6e 79 20 6e 75 6d | 62 65 72 00 00 00 11 f4 | any num|ber.....|
|000031e0| 00 09 00 55 c2 6f 66 20 | 74 68 65 6d 2e 20 20 54 |...U.of |them. T|
|000031f0| 68 65 20 73 65 6c 65 63 | 74 65 64 20 71 75 61 64 |he selec|ted quad|
|00003200| 72 69 6c 61 74 65 72 61 | 6c 28 73 29 20 63 61 6e |rilatera|l(s) can|
|00003210| 20 62 65 20 72 6f 74 61 | 74 65 64 20 6f 72 20 72 | be rota|ted or r|
|00003220| 65 6d 6f 76 65 64 2e 20 | 20 49 6e 20 61 64 64 69 |emoved. | In addi|
|00003230| 74 69 6f 6e 2c 20 74 68 | 65 00 00 00 12 00 00 09 |tion, th|e.......|
|00003240| 00 5b c2 69 6e 74 65 72 | 69 6f 72 20 63 6f 6c 6f |.[.inter|ior colo|
|00003250| 72 20 6f 66 20 61 6e 79 | 20 71 75 61 64 20 63 61 |r of any| quad ca|
|00003260| 6e 20 62 65 20 63 68 61 | 6e 67 65 64 2e 20 20 4e |n be cha|nged. N|
|00003270| 6f 74 65 20 74 68 61 74 | 20 74 68 65 72 65 20 69 |ote that| there i|
|00003280| 73 20 6e 6f 20 63 61 70 | 61 62 69 6c 69 74 79 20 |s no cap|ability |
|00003290| 66 6f 72 20 74 68 65 20 | 65 6e 74 72 79 00 00 00 |for the |entry...|
|000032a0| 12 0c 00 09 00 51 c2 6f | 66 20 6e 65 77 20 71 75 |.....Q.o|f new qu|
|000032b0| 61 64 72 69 6c 61 74 65 | 72 61 6c 73 2e 20 20 54 |adrilate|rals. T|
|000032c0| 68 69 73 20 69 73 20 62 | 61 73 69 63 61 6c 6c 79 |his is b|asically|
|000032d0| 20 77 68 61 74 20 64 69 | 66 66 65 72 65 6e 74 69 | what di|fferenti|
|000032e0| 61 74 65 73 20 4d 69 6e | 69 51 75 61 64 57 6f 72 |ates Min|iQuadWor|
|000032f0| 6c 64 20 66 72 6f 6d 00 | 00 00 12 18 00 09 00 3e |ld from.|.......>|
|00003300| c2 28 66 75 6c 6c 29 20 | 51 75 61 64 57 6f 72 6c |.(full) |QuadWorl|
|00003310| 64 2e 20 20 46 69 67 75 | 72 65 20 37 20 73 68 6f |d. Figu|re 7 sho|
|00003320| 77 73 20 61 20 73 63 72 | 65 65 6e 20 64 75 6d 70 |ws a scr|een dump|
|00003330| 20 6f 66 20 74 68 69 73 | 20 61 70 70 2e 20 00 00 | of this| app. ..|
|00003340| 13 11 00 2c 00 06 c2 f0 | 00 88 01 5c 00 00 13 2c |...,....|...\...,|
|00003350| 00 0a 00 56 c6 46 69 67 | 75 72 65 20 37 2e 20 20 |...V.Fig|ure 7. |
|00003360| 53 63 72 65 65 6e 20 64 | 75 6d 70 20 6f 66 20 74 |Screen d|ump of t|
|00003370| 68 65 20 4d 69 6e 69 51 | 75 61 64 57 6f 72 6c 64 |he MiniQ|uadWorld|
|00003380| 2b 20 61 70 70 6c 69 63 | 61 74 69 6f 6e 2e 20 20 |+ applic|ation. |
|00003390| 54 68 69 73 20 61 70 70 | 6c 69 63 61 74 69 6f 6e |This app|lication|
|000033a0| 20 68 61 73 20 74 68 72 | 65 65 00 00 13 38 00 15 | has thr|ee...8..|
|000033b0| 00 51 c6 63 6f 6d 6d 61 | 6e 64 20 73 75 62 63 6c |.Q.comma|nd subcl|
|000033c0| 61 73 73 65 73 20 74 68 | 61 74 20 69 6d 70 6c 65 |asses th|at imple|
|000033d0| 6d 65 6e 74 20 74 68 65 | 20 75 73 65 72 20 69 6e |ment the| user in|
|000033e0| 74 65 72 61 63 74 69 6f | 6e 73 20 77 69 74 68 20 |teractio|ns with |
|000033f0| 74 68 65 20 71 75 61 64 | 72 69 6c 61 74 65 72 61 |the quad|rilatera|
|00003400| 6c 73 2e 00 00 00 13 53 | 00 24 00 4c c2 54 68 65 |ls.....S|.$.L.The|
|00003410| 20 74 68 72 65 65 20 63 | 6f 6d 6d 61 6e 64 20 63 | three c|ommand c|
|00003420| 6c 61 73 73 65 73 20 69 | 6e 20 4d 69 6e 69 51 75 |lasses i|n MiniQu|
|00003430| 61 64 57 6f 72 6c 64 2b | 20 61 72 65 20 52 6f 74 |adWorld+| are Rot|
|00003440| 61 74 65 20 51 75 61 64 | 20 43 6d 64 2c 20 43 6c |ate Quad| Cmd, Cl|
|00003450| 65 61 72 20 51 75 61 64 | 00 00 13 5f 00 09 00 54 |ear Quad|..._...T|
|00003460| c2 43 6d 64 2c 20 61 6e | 64 20 52 65 63 6f 6c 6f |.Cmd, an|d Recolo|
|00003470| 72 20 51 75 61 64 20 43 | 6d 64 2e 20 20 54 68 65 |r Quad C|md. The|
|00003480| 20 72 6f 74 61 74 69 6f | 6e 20 61 6e 64 20 63 6c | rotatio|n and cl|
|00003490| 65 61 72 69 6e 67 20 6f | 70 65 72 61 74 69 6f 6e |earing o|peration|
|000034a0| 73 20 61 72 65 20 61 63 | 63 65 73 73 65 64 20 76 |s are ac|cessed v|
|000034b0| 69 61 20 61 00 00 13 6b | 00 09 00 54 c2 6d 65 6e |ia a...k|...T.men|
|000034c0| 75 20 69 74 65 6d 20 74 | 6f 20 70 65 72 66 6f 72 |u item t|o perfor|
|000034d0| 6d 20 74 68 65 20 64 65 | 73 69 72 65 64 20 6f 70 |m the de|sired op|
|000034e0| 65 72 61 74 69 6f 6e 20 | 6f 6e 20 61 6c 6c 20 74 |eration |on all t|
|000034f0| 68 65 20 63 75 72 72 65 | 6e 74 6c 79 20 73 65 6c |he curre|ntly sel|
|00003500| 65 63 74 65 64 20 71 75 | 61 64 73 2c 20 61 6e 64 |ected qu|ads, and|
|00003510| 00 00 13 77 00 09 00 54 | c2 74 68 75 73 20 74 68 |...w...T|.thus th|
|00003520| 65 20 61 73 73 6f 63 69 | 61 74 65 64 20 63 6f 6d |e associ|ated com|
|00003530| 6d 61 6e 64 73 20 61 72 | 65 20 73 75 62 63 6c 61 |mands ar|e subcla|
|00003540| 73 73 65 73 20 6f 66 20 | 4d 65 6e 75 20 42 65 68 |sses of |Menu Beh|
|00003550| 61 76 69 6f 72 2e 20 20 | 52 65 63 6f 6c 6f 72 69 |avior. |Recolori|
|00003560| 6e 67 20 61 20 71 75 61 | 64 20 69 73 00 00 13 83 |ng a qua|d is....|
|00003570| 00 09 00 56 c2 61 63 63 | 6f 6d 70 6c 69 73 68 65 |...V.acc|omplishe|
|00003580| 64 20 62 79 20 6f 70 74 | 69 6f 6e 2d 63 6c 69 63 |d by opt|ion-clic|
|00003590| 6b 69 6e 67 20 6f 6e 20 | 74 68 65 20 71 75 61 64 |king on |the quad|
|000035a0| 2c 20 61 6e 64 20 69 74 | 20 6e 6f 74 20 61 63 63 |, and it| not acc|
|000035b0| 65 73 73 69 62 6c 65 20 | 76 69 61 20 61 20 6d 65 |essible |via a me|
|000035c0| 6e 75 2e 20 20 28 4e 6f | 74 65 00 00 13 8f 00 09 |nu. (No|te......|
|000035d0| 00 59 c2 74 68 61 74 20 | 49 20 61 6d 20 6e 6f 74 |.Y.that |I am not|
|000035e0| 20 69 6d 70 6c 79 69 6e | 67 20 74 68 61 74 20 74 | implyin|g that t|
|000035f0| 68 69 73 20 69 73 20 6e | 65 63 65 73 73 61 72 69 |his is n|ecessari|
|00003600| 6c 79 20 74 68 65 20 62 | 65 73 74 20 75 73 65 72 |ly the b|est user|
|00003610| 20 69 6e 74 65 72 66 61 | 63 65 2c 20 62 75 74 20 | interfa|ce, but |
|00003620| 72 61 74 68 65 72 20 74 | 68 61 74 00 00 00 13 9b |rather t|hat.....|
|00003630| 00 09 00 49 c2 69 74 20 | 64 65 6d 6f 6e 73 74 72 |...I.it |demonstr|
|00003640| 61 74 65 73 20 64 69 66 | 66 65 72 65 6e 74 20 77 |ates dif|ferent w|
|00003650| 61 79 73 20 69 6e 20 77 | 68 69 63 68 20 63 6f 6d |ays in w|hich com|
|00003660| 6d 61 6e 64 73 20 6d 69 | 67 68 74 20 62 65 20 69 |mands mi|ght be i|
|00003670| 6e 73 74 61 6e 74 69 61 | 74 65 64 2e 29 00 00 00 |nstantia|ted.)...|
|00003680| 13 ac 00 24 00 4e c2 42 | 65 63 61 75 73 65 20 61 |...$.N.B|ecause a|
|00003690| 6e 79 20 6e 75 6d 62 65 | 72 20 6f 66 20 71 75 61 |ny numbe|r of qua|
|000036a0| 64 73 20 63 61 6e 20 62 | 65 20 73 65 6c 65 63 74 |ds can b|e select|
|000036b0| 65 64 20 61 6e 64 20 72 | 6f 74 61 74 65 64 20 61 |ed and r|otated a|
|000036c0| 6e 64 20 63 6c 65 61 72 | 65 64 2c 20 74 68 65 20 |nd clear|ed, the |
|000036d0| 6f 6e 6c 79 00 00 13 b8 | 00 09 00 56 c2 70 72 61 |only....|...V.pra|
|000036e0| 63 74 69 63 61 6c 20 77 | 61 79 20 74 6f 20 73 75 |ctical w|ay to su|
|000036f0| 70 70 6f 72 74 20 75 6e | 64 6f 20 66 6f 72 20 72 |pport un|do for r|
|00003700| 6f 74 61 74 69 6f 6e 20 | 69 73 20 66 6f 72 20 65 |otation |is for e|
|00003710| 61 63 68 20 71 75 61 64 | 72 69 6c 61 74 65 72 61 |ach quad|rilatera|
|00003720| 6c 20 74 6f 20 73 74 6f | 72 65 20 69 74 73 20 6f |l to sto|re its o|
|00003730| 6c 64 00 00 13 c4 00 09 | 00 57 c2 70 6f 73 69 74 |ld......|.W.posit|
|00003740| 69 6f 6e 2e 20 20 53 74 | 6f 72 69 6e 67 20 74 68 |ion. St|oring th|
|00003750| 69 73 20 64 61 74 61 20 | 69 6e 20 74 68 65 20 63 |is data |in the c|
|00003760| 6f 6d 6d 61 6e 64 20 6f | 62 6a 65 63 74 20 69 74 |ommand o|bject it|
|00003770| 73 65 6c 66 20 77 6f 75 | 6c 64 20 62 65 20 63 75 |self wou|ld be cu|
|00003780| 6d 62 65 72 73 6f 6d 65 | 20 61 74 20 62 65 73 74 |mbersome| at best|
|00003790| 2c 00 00 00 13 d0 00 09 | 00 59 c2 61 6e 64 20 74 |,.......|.Y.and t|
|000037a0| 6f 74 61 6c 6c 79 20 75 | 6e 6d 61 6e 61 67 65 61 |otally u|nmanagea|
|000037b0| 62 6c 65 20 61 74 20 77 | 6f 72 73 74 2e 20 20 49 |ble at w|orst. I|
|000037c0| 74 20 61 6c 73 6f 20 74 | 75 72 6e 65 64 20 6f 75 |t also t|urned ou|
|000037d0| 74 20 74 6f 20 73 69 6d | 70 6c 69 66 79 20 74 68 |t to sim|plify th|
|000037e0| 65 20 69 6d 70 6c 65 6d | 65 6e 74 61 74 69 6f 6e |e implem|entation|
|000037f0| 20 69 66 00 00 00 13 dc | 00 09 00 57 c2 65 61 63 | if.....|...W.eac|
|00003800| 68 20 71 75 61 64 72 69 | 6c 61 74 65 72 61 6c 20 |h quadri|lateral |
|00003810| 61 6c 73 6f 20 72 65 63 | 6f 72 64 65 64 20 69 74 |also rec|orded it|
|00003820| 73 20 73 65 6c 65 63 74 | 69 6f 6e 20 73 74 61 74 |s select|ion stat|
|00003830| 65 2e 20 20 54 68 75 73 | 20 74 68 65 20 52 6f 74 |e. Thus| the Rot|
|00003840| 61 74 65 20 51 75 61 64 | 20 43 6d 64 20 63 61 75 |ate Quad| Cmd cau|
|00003850| 73 65 73 00 00 00 13 e8 | 00 09 00 56 c2 65 61 63 |ses.....|...V.eac|
|00003860| 68 20 73 65 6c 65 63 74 | 65 64 20 71 75 61 64 20 |h select|ed quad |
|00003870| 74 6f 20 63 6f 70 79 20 | 74 68 65 20 63 75 72 72 |to copy |the curr|
|00003880| 65 6e 74 20 70 6f 73 69 | 74 69 6f 6e 20 76 61 6c |ent posi|tion val|
|00003890| 75 65 73 20 69 6e 74 6f | 20 74 68 65 20 63 6f 72 |ues into| the cor|
|000038a0| 72 65 73 70 6f 6e 64 69 | 6e 67 20 ff d4 6f 6c 64 |respondi|ng ..old|
|000038b0| ff d5 00 00 13 f4 00 09 | 00 54 c2 61 74 74 72 69 |........|.T.attri|
|000038c0| 62 75 74 65 73 2c 20 63 | 61 6c 63 75 6c 61 74 65 |butes, c|alculate|
|000038d0| 20 74 68 65 20 6e 65 77 | 20 70 6f 73 69 74 69 6f | the new| positio|
|000038e0| 6e 2c 20 61 6e 64 20 74 | 68 65 6e 20 63 61 75 73 |n, and t|hen caus|
|000038f0| 65 20 61 20 73 63 72 65 | 65 6e 20 72 65 66 72 65 |e a scre|en refre|
|00003900| 73 68 2e 20 20 55 6e 64 | 6f 20 6a 75 73 74 00 00 |sh. Und|o just..|
|00003910| 14 00 00 09 00 59 c2 63 | 6f 70 69 65 73 20 74 68 |.....Y.c|opies th|
|00003920| 65 20 6f 6c 64 20 76 61 | 6c 75 65 73 20 62 61 63 |e old va|lues bac|
|00003930| 6b 2e 20 20 46 69 67 75 | 72 65 20 38 20 73 68 6f |k. Figu|re 8 sho|
|00003940| 77 73 20 74 68 65 20 44 | 6f 20 6d 65 74 68 6f 64 |ws the D|o method|
|00003950| 20 66 6f 72 20 74 68 69 | 73 20 63 6c 61 73 73 2c | for thi|s class,|
|00003960| 20 61 6e 64 20 74 68 65 | 20 6d 65 74 68 6f 64 00 | and the| method.|
|00003970| 00 00 14 0c 00 09 00 44 | c2 69 6e 76 6f 6b 65 64 |.......D|.invoked|
|00003980| 20 62 79 20 74 68 65 20 | 6d 65 6e 75 20 62 65 68 | by the |menu beh|
|00003990| 61 76 69 6f 72 20 61 73 | 73 6f 63 69 61 74 65 64 |avior as|sociated|
|000039a0| 20 77 69 74 68 20 74 68 | 65 20 52 6f 74 61 74 65 | with th|e Rotate|
|000039b0| 20 6d 65 6e 75 20 69 74 | 65 6d 2e 20 00 00 14 1d | menu it|em. ....|
|000039c0| 00 24 00 4d c2 54 68 65 | 20 63 6c 65 61 72 20 6f |.$.M.The| clear o|
|000039d0| 70 65 72 61 74 69 6f 6e | 20 77 6f 72 6b 73 20 62 |peration| works b|
|000039e0| 79 20 6a 75 73 74 20 72 | 65 6d 6f 76 69 6e 67 20 |y just r|emoving |
|000039f0| 74 68 65 20 63 75 72 72 | 65 6e 74 6c 79 20 73 65 |the curr|ently se|
|00003a00| 6c 65 63 74 65 64 20 71 | 75 61 64 73 20 66 72 6f |lected q|uads fro|
|00003a10| 6d 00 00 00 14 29 00 09 | 00 5a c2 74 68 65 20 6c |m....)..|.Z.the l|
|00003a20| 69 73 74 20 6f 66 20 6f | 62 6a 65 63 74 73 20 69 |ist of o|bjects i|
|00003a30| 6e 20 74 68 65 20 64 6f | 63 75 6d 65 6e 74 2c 20 |n the do|cument, |
|00003a40| 61 6e 64 20 69 74 73 20 | 75 6e 64 6f 20 6d 65 72 |and its |undo mer|
|00003a50| 65 6c 79 20 63 6f 70 69 | 65 73 20 74 68 65 6d 20 |ely copi|es them |
|00003a60| 62 61 63 6b 2e 20 20 54 | 68 65 20 63 6c 65 61 72 |back. T|he clear|
|00003a70| 20 61 6c 6c 00 00 14 35 | 00 09 00 57 c2 71 75 61 | all...5|...W.qua|
|00003a80| 64 73 20 6f 70 65 72 61 | 74 69 6f 6e 20 69 73 20 |ds opera|tion is |
|00003a90| 6e 6f 74 20 69 6d 70 6c | 65 6d 65 6e 74 65 64 20 |not impl|emented |
|00003aa0| 77 69 74 68 20 61 20 64 | 69 73 74 69 6e 63 74 20 |with a d|istinct |
|00003ab0| 54 43 6f 6d 6d 61 6e 64 | 20 73 75 62 63 6c 61 73 |TCommand| subclas|
|00003ac0| 73 2c 20 62 75 74 20 6a | 75 73 74 20 73 65 6c 65 |s, but j|ust sele|
|00003ad0| 63 74 73 00 00 00 14 41 | 00 09 00 20 c2 61 6c 6c |cts....A|... .all|
|00003ae0| 20 74 68 65 20 71 75 61 | 64 73 20 61 6e 64 20 64 | the qua|ds and d|
|00003af0| 6f 65 73 20 61 20 63 6c | 65 61 72 2e 00 00 14 52 |oes a cl|ear....R|
|00003b00| 00 24 00 54 c2 52 65 63 | 6f 6c 6f 72 69 6e 67 20 |.$.T.Rec|oloring |
|00003b10| 61 20 71 75 61 64 2c 20 | 73 69 6e 63 65 20 69 74 |a quad, |since it|
|00003b20| 20 69 73 20 6e 6f 74 20 | 61 20 6d 65 6e 75 20 6f | is not |a menu o|
|00003b30| 70 65 72 61 74 69 6f 6e | 2c 20 77 6f 72 6b 73 20 |peration|, works |
|00003b40| 64 69 66 66 65 72 65 6e | 74 6c 79 20 74 68 61 6e |differen|tly than|
|00003b50| 20 61 6c 6c 20 74 68 65 | 00 00 14 5e 00 09 00 57 | all the|...^...W|
|00003b60| c2 6f 74 68 65 72 20 6f | 70 65 72 61 74 69 6f 6e |.other o|peration|
|00003b70| 73 2e 20 20 54 68 65 20 | 63 6c 69 63 6b 20 6d 65 |s. The |click me|
|00003b80| 74 68 6f 64 20 66 6f 72 | 20 74 68 65 20 51 75 61 |thod for| the Qua|
|00003b90| 64 20 47 72 61 70 68 69 | 63 61 6c 20 56 69 65 77 |d Graphi|cal View|
|00003ba0| 20 63 6c 61 73 73 20 63 | 68 65 63 6b 73 20 74 6f | class c|hecks to|
|00003bb0| 20 73 65 65 20 69 66 00 | 00 00 14 6a 00 09 00 58 | see if.|...j...X|
|00003bc0| c2 74 68 65 20 6f 70 74 | 69 6f 6e 20 6b 65 79 20 |.the opt|ion key |
|00003bd0| 69 73 20 68 65 6c 64 20 | 64 6f 77 6e 2c 20 61 6e |is held |down, an|
|00003be0| 64 20 69 66 20 73 6f 2c | 20 61 6c 6c 6f 63 61 74 |d if so,| allocat|
|00003bf0| 65 73 20 61 6e 64 20 70 | 6f 73 74 73 20 61 6e 20 |es and p|osts an |
|00003c00| 69 6e 73 74 61 6e 63 65 | 20 6f 66 20 52 65 63 6f |instance| of Reco|
|00003c10| 6c 6f 72 20 51 75 61 64 | 00 00 14 76 00 09 00 4f |lor Quad|...v...O|
|00003c20| c2 43 6d 64 2e 20 20 54 | 68 65 20 69 6e 74 65 72 |.Cmd. T|he inter|
|00003c30| 6e 61 6c 73 20 6f 66 20 | 74 68 65 20 6d 65 74 68 |nals of |the meth|
|00003c40| 6f 64 73 20 6f 66 20 74 | 68 61 74 20 63 6c 61 73 |ods of t|hat clas|
|00003c50| 73 20 61 72 65 20 76 65 | 72 79 20 73 69 6d 69 6c |s are ve|ry simil|
|00003c60| 61 72 20 74 6f 20 74 68 | 65 20 6f 74 68 65 72 00 |ar to th|e other.|
|00003c70| 00 00 14 82 00 09 00 20 | c2 4d 69 6e 69 51 75 61 |....... |.MiniQua|
|00003c80| 64 57 6f 72 6c 64 2b 20 | 63 6f 6d 6d 61 6e 64 20 |dWorld+ |command |
|00003c90| 63 6c 61 73 73 65 73 2e | 00 00 14 98 00 86 00 1d |classes.|........|
|00003ca0| c4 57 68 61 74 20 57 6f | 72 6b 65 64 20 61 6e 64 |.What Wo|rked and|
|00003cb0| 20 57 68 61 74 20 44 69 | 64 6e ff d5 74 00 00 00 | What Di|dn..t...|
|00003cc0| 14 ae 00 09 00 52 c2 49 | 20 77 61 73 20 61 62 6c |.....R.I| was abl|
|00003cd0| 65 20 74 6f 20 67 65 74 | 20 65 76 65 72 79 20 70 |e to get| every p|
|00003ce0| 69 65 63 65 20 6f 66 20 | 66 75 6e 63 74 69 6f 6e |iece of |function|
|00003cf0| 61 6c 69 74 79 20 66 6f | 72 20 4d 69 6e 69 51 75 |ality fo|r MiniQu|
|00003d00| 61 64 57 6f 72 6c 64 2b | 20 69 6d 70 6c 65 6d 65 |adWorld+| impleme|
|00003d10| 6e 74 65 64 20 61 6e 64 | 00 00 14 ba 00 09 00 50 |nted and|.......P|
|00003d20| c2 77 6f 72 6b 69 6e 67 | 20 63 6f 72 72 65 63 74 |.working| correct|
|00003d30| 6c 79 2e 20 20 54 68 65 | 20 61 63 74 69 6f 6e 73 |ly. The| actions|
|00003d40| 20 6f 66 20 72 6f 74 61 | 74 69 6e 67 2c 20 63 6c | of rota|ting, cl|
|00003d50| 65 61 72 69 6e 67 2c 20 | 6f 72 20 72 65 63 6f 6c |earing, |or recol|
|00003d60| 6f 72 69 6e 67 20 61 20 | 71 75 61 64 20 61 72 65 |oring a |quad are|
|00003d70| 00 00 14 c6 00 09 00 5d | c2 75 6e 64 6f 61 62 6c |.......]|.undoabl|
|00003d80| 65 2c 20 61 73 20 69 73 | 20 74 68 65 20 63 6c 65 |e, as is| the cle|
|00003d90| 61 72 69 6e 67 20 6f 66 | 20 61 6c 6c 20 74 68 65 |aring of| all the|
|00003da0| 20 71 75 61 64 73 2e 20 | 20 54 68 69 73 20 69 73 | quads. | This is|
|00003db0| 6e ff d5 74 20 74 6f 6f | 20 73 75 72 70 72 69 73 |n..t too| surpris|
|00003dc0| 69 6e 67 20 67 69 76 65 | 6e 20 74 68 65 20 6c 69 |ing give|n the li|
|00003dd0| 6d 69 74 65 64 00 00 00 | 14 d2 00 09 00 58 c2 66 |mited...|.....X.f|
|00003de0| 65 61 74 75 72 65 73 20 | 6f 66 20 74 68 69 73 20 |eatures |of this |
|00003df0| 74 6f 79 20 61 70 70 6c | 69 63 61 74 69 6f 6e 2c |toy appl|ication,|
|00003e00| 20 62 75 74 20 69 74 20 | 69 73 20 73 74 69 6c 6c | but it |is still|
|00003e10| 20 67 6f 6f 64 20 74 6f | 20 6b 6e 6f 77 2e 20 20 | good to| know. |
|00003e20| 48 6f 77 65 76 65 72 2c | 20 49 20 64 69 64 20 68 |However,| I did h|
|00003e30| 61 76 65 20 74 6f 00 00 | 14 de 00 09 00 54 c2 63 |ave to..|.....T.c|
|00003e40| 6f 72 72 65 63 74 20 61 | 20 73 69 67 6e 69 66 69 |orrect a| signifi|
|00003e50| 63 61 6e 74 20 62 75 67 | 20 69 6e 20 74 68 65 20 |cant bug| in the |
|00003e60| 43 50 58 20 63 6f 6d 6d | 61 6e 64 20 70 72 6f 63 |CPX comm|and proc|
|00003e70| 65 73 73 69 6e 67 20 74 | 6f 20 67 65 74 20 74 68 |essing t|o get th|
|00003e80| 65 20 75 6e 64 6f 20 66 | 65 61 74 75 72 65 73 20 |e undo f|eatures |
|00003e90| 6f 66 00 00 14 ea 00 09 | 00 2c c2 4d 69 6e 69 51 |of......|.,.MiniQ|
|00003ea0| 75 61 64 57 6f 72 6c 64 | 2b 20 74 6f 20 77 6f 72 |uadWorld|+ to wor|
|00003eb0| 6b 20 74 68 65 20 77 61 | 79 20 74 68 65 79 20 73 |k the wa|y they s|
|00003ec0| 68 6f 75 6c 64 2e 00 00 | 14 fb 00 24 00 51 c2 55 |hould...|...$.Q.U|
|00003ed0| 6e 64 6f 20 77 6f 72 6b | 65 64 20 63 6f 72 72 65 |ndo work|ed corre|
|00003ee0| 63 74 6c 79 20 61 73 20 | 6c 6f 6e 67 20 61 73 20 |ctly as |long as |
|00003ef0| 74 68 65 20 75 73 65 72 | 20 64 69 64 6e ff d5 74 |the user| didn..t|
|00003f00| 20 70 65 72 66 6f 72 6d | 20 61 6e 79 20 61 63 74 | perform| any act|
|00003f10| 69 6f 6e 20 62 65 74 77 | 65 65 6e 20 74 68 65 00 |ion betw|een the.|
|00003f20| 00 00 15 07 00 09 00 54 | c2 65 78 65 63 75 74 69 |.......T|.executi|
|00003f30| 6f 6e 20 6f 66 20 74 68 | 65 20 75 6e 64 6f 61 62 |on of th|e undoab|
|00003f40| 6c 65 20 63 6f 6d 6d 61 | 6e 64 20 61 6e 64 20 74 |le comma|nd and t|
|00003f50| 68 65 20 75 6e 64 6f 20 | 72 65 71 75 65 73 74 2e |he undo |request.|
|00003f60| 20 20 41 6e 79 20 61 63 | 74 69 6f 6e 2e 20 20 53 | Any ac|tion. S|
|00003f70| 63 72 6f 6c 6c 69 6e 67 | 20 74 68 65 00 00 15 13 |crolling| the....|
|00003f80| 00 09 00 55 c2 77 69 6e | 64 6f 77 2c 20 6d 6f 76 |...U.win|dow, mov|
|00003f90| 69 6e 67 20 74 68 65 20 | 77 69 6e 64 6f 77 2c 20 |ing the |window, |
|00003fa0| 61 6e 64 20 63 6c 69 63 | 6b 69 6e 67 20 69 6e 20 |and clic|king in |
|00003fb0| 74 68 65 20 77 69 6e 64 | 6f 77 ff d5 73 20 63 6f |the wind|ow..s co|
|00003fc0| 6e 74 65 6e 74 20 72 65 | 67 69 6f 6e 20 28 61 6d |ntent re|gion (am|
|00003fd0| 6f 6e 67 20 6f 74 68 65 | 72 00 00 00 15 1f 00 09 |ong othe|r.......|
|00003fe0| 00 4f c2 74 68 69 6e 67 | 73 29 20 61 6c 6c 20 63 |.O.thing|s) all c|
|00003ff0| 6f 6d 6d 69 74 74 65 64 | 20 74 68 65 20 70 72 65 |ommitted| the pre|
|00004000| 76 69 6f 75 73 20 63 6f | 6d 6d 61 6e 64 2e 20 20 |vious co|mmand. |
|00004010| 54 68 69 73 20 69 73 20 | 61 6e 20 65 78 61 6d 70 |This is |an examp|
|00004020| 6c 65 20 6f 66 20 70 72 | 65 6d 61 74 75 72 65 6c |le of pr|ematurel|
|00004030| 79 00 00 00 15 2b 00 09 | 00 4f c2 63 6f 6d 6d 69 |y....+..|.O.commi|
|00004040| 74 74 69 6e 67 20 61 20 | 63 6f 6d 6d 61 6e 64 2e |tting a |command.|
|00004050| 20 20 28 ff d4 43 6f 6d | 6d 69 74 74 69 6e 67 ff | (..Com|mitting.|
|00004060| d5 20 61 20 63 6f 6d 6d | 61 6e 64 20 69 73 20 74 |. a comm|and is t|
|00004070| 65 72 6d 20 66 72 6f 6d | 20 4d 61 63 41 70 70 2c |erm from| MacApp,|
|00004080| 20 6e 6f 74 20 66 72 6f | 6d 00 00 00 15 37 00 09 | not fro|m....7..|
|00004090| 00 58 c2 43 50 58 2e 20 | 20 49 74 20 6d 65 61 6e |.X.CPX. | It mean|
|000040a0| 73 20 74 68 61 74 20 74 | 68 65 20 75 73 65 72 20 |s that t|he user |
|000040b0| 68 61 73 20 6a 75 73 74 | 20 70 65 72 66 6f 72 6d |has just| perform|
|000040c0| 65 64 20 61 6e 6f 74 68 | 65 72 20 75 6e 64 6f 61 |ed anoth|er undoa|
|000040d0| 62 6c 65 20 61 63 74 69 | 6f 6e 2c 20 61 6e 64 20 |ble acti|on, and |
|000040e0| 73 69 6e 63 65 20 6f 6e | 6c 79 00 00 15 43 00 09 |since on|ly...C..|
|000040f0| 00 58 c2 73 69 6e 67 6c | 65 20 6c 65 76 65 6c 20 |.X.singl|e level |
|00004100| 75 6e 64 6f 20 69 73 20 | 73 75 70 70 6f 72 74 65 |undo is |supporte|
|00004110| 64 20 62 79 20 4d 61 63 | 41 70 70 2c 20 69 74 20 |d by Mac|App, it |
|00004120| 69 73 20 74 69 6d 65 20 | 74 6f 20 ff d4 74 68 72 |is time |to ..thr|
|00004130| 6f 77 20 61 77 61 79 ff | d5 20 74 68 65 20 6c 61 |ow away.|. the la|
|00004140| 73 74 20 63 6f 6d 6d 61 | 6e 64 00 00 15 4f 00 09 |st comma|nd...O..|
|00004150| 00 59 c2 6f 62 6a 65 63 | 74 2e 20 20 4a 75 73 74 |.Y.objec|t. Just|
|00004160| 20 62 65 66 6f 72 65 20 | 74 68 69 73 20 69 73 20 | before |this is |
|00004170| 64 6f 6e 65 2c 20 74 68 | 65 20 63 6f 6d 6d 61 6e |done, th|e comman|
|00004180| 64 20 6f 62 6a 65 63 74 | 20 69 73 20 67 69 76 65 |d object| is give|
|00004190| 6e 20 6f 6e 65 20 6c 61 | 73 74 20 63 68 61 6e 63 |n one la|st chanc|
|000041a0| 65 20 74 6f 20 64 6f 20 | 61 6e 79 00 00 00 15 5b |e to do |any....[|
|000041b0| 00 09 00 55 c2 63 6c 65 | 61 6e 20 75 70 20 70 72 |...U.cle|an up pr|
|000041c0| 6f 63 65 73 73 69 6e 67 | 2e 20 20 54 68 69 73 20 |ocessing|. This |
|000041d0| 6c 61 73 74 20 63 68 61 | 6e 63 65 20 70 72 6f 63 |last cha|nce proc|
|000041e0| 65 73 73 69 6e 67 20 69 | 73 20 69 6d 70 6c 65 6d |essing i|s implem|
|000041f0| 65 6e 74 65 64 20 69 6e | 20 54 43 6f 6d 6d 61 6e |ented in| TComman|
|00004200| 64 2e 43 6f 6d 6d 69 74 | 2e 00 00 00 15 67 00 09 |d.Commit|.....g..|
|00004210| 00 54 c2 54 68 65 6e 20 | 74 68 65 20 66 72 61 6d |.T.Then |the fram|
|00004220| 65 77 6f 72 6b 20 64 69 | 73 70 6f 73 65 73 20 6f |ework di|sposes o|
|00004230| 66 20 74 68 65 20 63 6f | 6d 6d 61 6e 64 20 6f 62 |f the co|mmand ob|
|00004240| 6a 65 63 74 2e 20 20 43 | 50 58 20 64 6f 65 73 20 |ject. C|PX does |
|00004250| 6e 6f 74 20 68 61 76 65 | 20 74 68 65 20 6e 6f 74 |not have| the not|
|00004260| 69 6f 6e 20 6f 66 00 00 | 15 73 00 09 00 57 c2 63 |ion of..|.s...W.c|
|00004270| 6f 6d 6d 69 74 74 69 6e | 67 20 61 20 63 6f 6d 6d |ommittin|g a comm|
|00004280| 61 6e 64 2c 20 73 6f 20 | 69 74 20 6a 75 73 74 20 |and, so |it just |
|00004290| ff d4 74 68 72 6f 77 73 | 20 61 77 61 79 ff d5 20 |..throws| away.. |
|000042a0| 74 68 65 20 6f 6c 64 20 | 63 6f 6d 6d 61 6e 64 20 |the old |command |
|000042b0| 6f 62 6a 65 63 74 20 61 | 74 20 74 68 69 73 20 74 |object a|t this t|
|000042c0| 69 6d 65 2e 20 00 00 00 | 15 7f 00 09 00 4d c2 28 |ime. ...|.....M.(|
|000042d0| 53 69 6e 63 65 20 50 72 | 6f 67 72 61 70 68 20 68 |Since Pr|ograph h|
|000042e0| 61 73 20 67 61 72 62 61 | 67 65 20 63 6f 6c 6c 65 |as garba|ge colle|
|000042f0| 63 74 69 6f 6e 2c 20 74 | 68 72 6f 77 69 6e 67 20 |ction, t|hrowing |
|00004300| 61 77 61 79 20 74 68 65 | 20 63 6f 6d 6d 61 6e 64 |away the| command|
|00004310| 20 6a 75 73 74 20 6d 65 | 61 6e 73 00 00 00 15 8b | just me|ans.....|
|00004320| 00 09 00 57 c2 6c 65 74 | 74 69 6e 67 20 67 6f 20 |...W.let|ting go |
|00004330| 6f 66 20 61 6e 79 20 72 | 65 66 65 72 65 6e 63 65 |of any r|eference|
|00004340| 73 20 74 6f 20 69 74 2e | 29 20 50 72 65 6d 61 74 |s to it.|) Premat|
|00004350| 75 72 65 20 63 6f 6d 6d | 69 74 6d 65 6e 74 20 6f |ure comm|itment o|
|00004360| 66 20 61 20 63 6f 6d 6d | 61 6e 64 20 6f 62 6a 65 |f a comm|and obje|
|00004370| 63 74 20 69 73 20 61 20 | 62 75 67 00 00 00 15 97 |ct is a |bug.....|
|00004380| 00 09 00 49 c2 74 68 61 | 74 20 70 72 65 6d 61 74 |...I.tha|t premat|
|00004390| 75 72 65 6c 79 20 74 61 | 6b 65 73 20 61 77 61 79 |urely ta|kes away|
|000043a0| 20 66 72 6f 6d 20 74 68 | 65 20 75 73 65 72 20 74 | from th|e user t|
|000043b0| 68 65 20 61 62 69 6c 69 | 74 79 20 74 6f 20 75 6e |he abili|ty to un|
|000043c0| 64 6f 20 61 6e 20 61 63 | 74 69 6f 6e 2e 00 00 00 |do an ac|tion....|
|000043d0| 17 e8 00 04 00 06 c2 f0 | 00 89 01 ac 00 00 18 03 |........|........|
|000043e0| 00 3d 00 44 c6 46 69 67 | 75 72 65 20 38 2e 20 20 |.=.D.Fig|ure 8. |
|000043f0| 54 68 65 20 63 6f 64 65 | 20 66 6f 72 20 69 6e 73 |The code| for ins|
|00004400| 74 61 6e 74 69 61 74 69 | 6e 67 2c 20 69 6e 69 74 |tantiati|ng, init|
|00004410| 69 61 6c 69 7a 69 6e 67 | 2c 20 61 6e 64 20 70 65 |ializing|, and pe|
|00004420| 72 66 6f 72 6d 69 6e 67 | 00 00 18 0f 00 9a 00 1c |rforming|........|
|00004430| c6 74 68 65 20 52 6f 74 | 61 74 65 20 51 75 61 64 |.the Rot|ate Quad|
|00004440| 20 43 6d 64 20 6f 62 6a | 65 63 74 2e 00 00 18 1b | Cmd obj|ect.....|
|00004450| 00 35 00 45 c6 54 68 69 | 73 20 6f 70 65 72 61 74 |.5.E.Thi|s operat|
|00004460| 69 6f 6e 20 69 73 20 69 | 6e 69 74 69 61 74 65 64 |ion is i|nitiated|
|00004470| 20 76 69 61 20 61 20 6d | 65 6e 75 20 69 74 65 6d | via a m|enu item|
|00004480| 20 61 6e 64 20 20 61 20 | 43 50 58 20 4d 65 6e 75 | and a |CPX Menu|
|00004490| 20 42 65 68 61 76 69 6f | 72 00 00 00 18 27 00 73 | Behavio|r....'.s|
|000044a0| 00 2e c6 61 73 73 6f 63 | 69 61 74 65 64 20 77 69 |...assoc|iated wi|
|000044b0| 74 68 20 74 68 61 74 20 | 69 74 65 6d 20 69 6e 76 |th that |item inv|
|000044c0| 6f 6b 65 73 20 74 68 69 | 73 20 63 6f 64 65 2e 20 |okes thi|s code. |
|000044d0| 00 00 1a 53 00 04 00 06 | c2 f0 00 8a 01 ac 00 00 |...S....|........|
|000044e0| 1a 6e 00 31 00 43 c6 46 | 69 67 75 72 65 20 39 2e |.n.1.C.F|igure 9.|
|000044f0| 20 20 54 68 65 20 63 6f | 72 72 65 63 74 69 6f 6e | The co|rrection|
|00004500| 20 74 6f 20 74 68 65 20 | 50 72 65 6d 61 74 75 72 | to the |Prematur|
|00004510| 65 20 43 6f 6d 6d 61 6e | 64 20 43 6f 6d 6d 69 74 |e Comman|d Commit|
|00004520| 6d 65 6e 74 20 62 75 67 | 2e 00 00 00 1a 7a 00 55 |ment bug|.....z.U|
|00004530| 00 36 c6 52 61 74 68 65 | 72 20 74 68 61 6e 20 61 |.6.Rathe|r than a|
|00004540| 6c 77 61 79 73 20 65 78 | 65 63 75 74 69 6e 67 20 |lways ex|ecuting |
|00004550| 61 20 57 69 6e 64 6f 77 | 2f 42 72 69 6e 67 20 74 |a Window|/Bring t|
|00004560| 6f 20 46 72 6f 6e 74 2c | 00 00 1a 86 00 14 00 55 |o Front,|.......U|
|00004570| c6 74 68 65 20 6d 6f 64 | 69 66 69 65 64 20 6d 65 |.the mod|ified me|
|00004580| 74 68 6f 64 20 20 66 69 | 72 73 74 20 63 68 65 63 |thod fi|rst chec|
|00004590| 6b 73 20 74 6f 20 73 65 | 65 20 69 66 20 74 68 65 |ks to se|e if the|
|000045a0| 20 77 69 6e 64 6f 77 20 | 69 73 20 61 6c 72 65 61 | window |is alrea|
|000045b0| 64 79 20 74 68 65 20 66 | 72 6f 6e 74 6d 6f 73 74 |dy the f|rontmost|
|000045c0| 20 6f 6e 65 2e 00 00 00 | 1a 92 00 5a 00 3a c6 49 | one....|...Z.:.I|
|000045d0| 66 20 73 6f 20 28 61 6e | 64 20 74 68 69 73 20 69 |f so (an|d this i|
|000045e0| 73 20 6f 66 74 65 6e 20 | 74 68 65 20 63 61 73 65 |s often |the case|
|000045f0| 29 2c 20 74 68 65 6e 20 | 6e 6f 74 68 69 6e 67 20 |), then |nothing |
|00004600| 69 73 20 64 6f 6e 65 2e | 00 00 1a 9e 00 26 00 4b |is done.|.....&.K|
|00004610| c6 54 68 69 73 20 73 6d | 61 6c 6c 20 66 69 78 20 |.This sm|all fix |
|00004620| 65 6c 69 6d 69 6e 61 74 | 65 73 20 6d 6f 73 74 2c |eliminat|es most,|
|00004630| 20 62 75 74 20 6e 6f 74 | 20 61 6c 6c 2c 20 6f 66 | but not| all, of|
|00004640| 20 74 68 65 20 70 72 65 | 6d 61 74 75 72 65 20 63 | the pre|mature c|
|00004650| 6f 6d 6d 69 74 6d 65 6e | 74 73 2e 00 00 00 1a b9 |ommitmen|ts......|
|00004660| 00 24 00 4c c2 49 20 68 | 61 76 65 20 74 72 61 63 |.$.L.I h|ave trac|
|00004670| 65 64 20 64 6f 77 6e 20 | 74 68 69 73 20 62 75 67 |ed down |this bug|
|00004680| 20 61 6e 64 20 69 6d 70 | 6c 65 6d 65 6e 74 65 64 | and imp|lemented|
|00004690| 20 61 20 6e 65 77 20 43 | 50 58 20 73 65 63 74 69 | a new C|PX secti|
|000046a0| 6f 6e 20 74 68 61 74 20 | 63 6f 72 72 65 63 74 73 |on that |corrects|
|000046b0| 00 00 1a c5 00 09 00 59 | c2 6d 6f 73 74 2c 20 62 |.......Y|.most, b|
|000046c0| 75 74 20 6e 6f 74 20 61 | 6c 6c 2c 20 6f 66 20 74 |ut not a|ll, of t|
|000046d0| 68 65 20 70 72 6f 62 6c | 65 6d 2e 20 20 54 68 65 |he probl|em. The|
|000046e0| 20 70 72 6f 62 6c 65 6d | 20 2d 20 61 74 20 6c 65 | problem| - at le|
|000046f0| 61 73 74 20 69 6e 73 6f | 66 61 72 20 61 73 20 49 |ast inso|far as I|
|00004700| 20 66 69 67 75 72 65 64 | 20 69 74 20 6f 75 74 20 | figured| it out |
|00004710| 2d 00 00 00 1a d1 00 09 | 00 52 c2 77 61 73 20 74 |-.......|.R.was t|
|00004720| 68 61 74 20 74 68 65 20 | 57 69 6e 64 6f 77 2f 42 |hat the |Window/B|
|00004730| 72 69 6e 67 20 74 6f 20 | 46 72 6f 6e 74 20 6d 65 |ring to |Front me|
|00004740| 74 68 6f 64 20 63 61 75 | 73 65 64 20 74 68 65 20 |thod cau|sed the |
|00004750| 6c 61 73 74 20 63 6f 6d | 6d 61 6e 64 20 74 6f 20 |last com|mand to |
|00004760| 62 65 20 63 6f 6d 6d 69 | 74 74 65 64 00 00 1a dd |be commi|tted....|
|00004770| 00 09 00 54 c2 61 6e 64 | 20 74 68 69 73 20 6d 65 |...T.and| this me|
|00004780| 74 68 6f 64 20 77 61 73 | 20 62 65 69 6e 67 20 69 |thod was| being i|
|00004790| 6e 76 6f 6b 65 64 20 4d | 55 43 48 20 74 6f 6f 20 |nvoked M|UCH too |
|000047a0| 6f 66 74 65 6e 2e 20 20 | 4f 6e 65 20 70 6f 72 74 |often. |One port|
|000047b0| 69 6f 6e 20 6f 66 20 6d | 79 20 66 69 78 20 28 46 |ion of m|y fix (F|
|000047c0| 69 67 75 72 65 20 39 29 | 00 00 1a e9 00 09 00 58 |igure 9)|.......X|
|000047d0| c2 6a 75 73 74 20 63 68 | 65 63 6b 73 20 74 6f 20 |.just ch|ecks to |
|000047e0| 73 65 65 20 69 66 20 74 | 68 65 20 77 69 6e 64 6f |see if t|he windo|
|000047f0| 77 20 74 68 61 74 20 69 | 73 20 61 62 6f 75 74 20 |w that i|s about |
|00004800| 74 6f 20 62 65 20 62 72 | 6f 75 67 68 74 20 74 6f |to be br|ought to|
|00004810| 20 74 68 65 20 66 72 6f | 6e 74 20 69 73 20 61 6c | the fro|nt is al|
|00004820| 72 65 61 64 79 20 69 6e | 00 00 1a f5 00 09 00 58 |ready in|.......X|
|00004830| c2 66 72 6f 6e 74 2c 20 | 61 6e 64 20 69 66 20 69 |.front, |and if i|
|00004840| 74 20 69 73 2c 20 74 68 | 65 6e 20 74 68 65 20 63 |t is, th|en the c|
|00004850| 61 6c 6c 20 74 6f 20 57 | 69 6e 64 6f 77 2f 42 72 |all to W|indow/Br|
|00004860| 69 6e 67 20 74 6f 20 46 | 72 6f 6e 74 20 69 73 20 |ing to F|ront is |
|00004870| 6e 6f 74 20 6d 61 64 65 | 2e 20 20 54 68 75 73 20 |not made|. Thus |
|00004880| 74 68 65 20 6c 61 73 74 | 00 00 1b 01 00 09 00 58 |the last|.......X|
|00004890| c2 63 6f 6d 6d 61 6e 64 | 20 69 73 20 6e 6f 74 20 |.command| is not |
|000048a0| 63 6f 6d 6d 69 74 74 65 | 64 2c 20 61 6e 64 20 65 |committe|d, and e|
|000048b0| 76 65 72 79 74 68 69 6e | 67 20 77 6f 72 6b 73 20 |verythin|g works |
|000048c0| 61 20 6c 69 74 74 6c 65 | 20 6d 6f 72 65 20 61 73 |a little| more as|
|000048d0| 20 69 74 20 73 68 6f 75 | 6c 64 2e 20 20 54 68 69 | it shou|ld. Thi|
|000048e0| 73 20 66 69 78 20 69 73 | 00 00 1b 0d 00 09 00 52 |s fix is|.......R|
|000048f0| c2 69 6e 20 74 68 65 20 | 44 65 73 6b 74 6f 70 20 |.in the |Desktop |
|00004900| 63 6c 61 73 73 2c 20 73 | 6f 20 49 20 68 61 76 65 |class, s|o I have|
|00004910| 20 73 75 62 63 6c 61 73 | 73 65 64 20 44 65 73 6b | subclas|sed Desk|
|00004920| 74 6f 70 20 61 6e 64 20 | 6f 76 65 72 6c 6f 61 64 |top and |overload|
|00004930| 65 64 20 74 68 65 20 61 | 70 70 72 6f 70 72 69 61 |ed the a|ppropria|
|00004940| 74 65 00 00 1b 19 00 09 | 00 55 c2 6d 65 74 68 6f |te......|.U.metho|
|00004950| 64 20 28 44 65 73 6b 74 | 6f 70 2f 4d 6f 75 73 65 |d (Deskt|op/Mouse|
|00004960| 20 44 6f 77 6e 29 2e 20 | 20 49 20 61 6c 73 6f 20 | Down). | I also |
|00004970| 61 64 64 65 64 20 61 20 | 6d 65 74 68 6f 64 20 74 |added a |method t|
|00004980| 6f 20 74 68 65 20 41 70 | 70 6c 69 63 61 74 69 6f |o the Ap|plicatio|
|00004990| 6e 20 73 75 62 63 6c 61 | 73 73 20 74 68 61 74 00 |n subcla|ss that.|
|000049a0| 00 00 1b 25 00 09 00 58 | c2 63 61 75 73 65 73 20 |...%...X|.causes |
|000049b0| 74 68 69 73 20 63 6f 72 | 72 65 63 74 65 64 20 44 |this cor|rected D|
|000049c0| 65 73 6b 74 6f 70 20 73 | 75 62 63 6c 61 73 73 20 |esktop s|ubclass |
|000049d0| 74 6f 20 62 65 20 69 6e | 73 74 61 6e 74 69 61 74 |to be in|stantiat|
|000049e0| 65 64 20 61 73 20 74 68 | 65 20 61 70 70 6c 69 63 |ed as th|e applic|
|000049f0| 61 74 69 6f 6e ff d5 73 | 20 44 65 73 6b 74 6f 70 |ation..s| Desktop|
|00004a00| 00 00 1b 31 00 09 00 55 | c2 69 6e 73 74 65 61 64 |...1...U|.instead|
|00004a10| 20 6f 66 20 74 68 65 20 | 6e 6f 72 6d 61 6c 20 6f | of the |normal o|
|00004a20| 6e 65 2e 20 20 41 6e 6f | 74 68 65 72 20 70 61 72 |ne. Ano|ther par|
|00004a30| 74 20 6f 66 20 6d 79 20 | 66 69 78 20 69 73 20 61 |t of my |fix is a|
|00004a40| 20 6d 65 74 68 6f 64 20 | 74 6f 20 62 65 20 70 6c | method |to be pl|
|00004a50| 61 63 65 64 20 69 6e 74 | 6f 20 61 6e 79 00 00 00 |aced int|o any...|
|00004a60| 1b 3d 00 09 00 55 c2 6d | 6f 76 61 62 6c 65 20 77 |.=...U.m|ovable w|
|00004a70| 69 6e 64 6f 77 20 73 75 | 62 63 6c 61 73 73 2e 20 |indow su|bclass. |
|00004a80| 20 54 68 69 73 20 57 69 | 6e 64 6f 77 20 6d 65 74 | This Wi|ndow met|
|00004a90| 68 6f 64 20 64 6f 65 73 | 20 74 68 65 20 73 61 6d |hod does| the sam|
|00004aa0| 65 20 73 6f 72 74 20 6f | 66 20 ff d4 42 72 69 6e |e sort o|f ..Brin|
|00004ab0| 67 20 74 6f 20 46 72 6f | 6e 74 2c 00 00 00 1b 49 |g to Fro|nt,....I|
|00004ac0| 00 09 00 44 c2 69 66 20 | 6e 65 63 65 73 73 61 72 |...D.if |necessar|
|00004ad0| 79 ff d5 20 6d 6f 64 69 | 66 69 63 61 74 69 6f 6e |y.. modi|fication|
|00004ae0| 20 66 6f 72 20 74 68 65 | 20 6f 70 65 72 61 74 69 | for the| operati|
|00004af0| 6f 6e 20 6f 66 20 6d 6f | 76 69 6e 67 20 74 68 65 |on of mo|ving the|
|00004b00| 20 77 69 6e 64 6f 77 2e | 00 00 1b 5a 00 24 00 54 | window.|...Z.$.T|
|00004b10| c2 49 20 68 61 76 65 20 | 70 61 63 6b 61 67 65 64 |.I have |packaged|
|00004b20| 20 74 68 69 73 20 70 61 | 74 63 68 20 69 6e 20 69 | this pa|tch in i|
|00004b30| 74 73 20 6f 77 6e 20 73 | 65 63 74 69 6f 6e 20 73 |ts own s|ection s|
|00004b40| 6f 20 74 68 61 74 20 49 | 20 28 61 6e 64 20 79 6f |o that I| (and yo|
|00004b50| 75 29 20 63 61 6e 20 65 | 61 73 69 6c 79 20 61 64 |u) can e|asily ad|
|00004b60| 64 20 69 74 00 00 1b 66 | 00 09 00 47 c2 74 6f 20 |d it...f|...G.to |
|00004b70| 6f 74 68 65 72 20 61 70 | 70 6c 69 63 61 74 69 6f |other ap|plicatio|
|00004b80| 6e 73 20 75 6e 74 69 6c | 20 74 68 65 20 6e 65 78 |ns until| the nex|
|00004b90| 74 20 6d 61 69 6e 74 65 | 6e 61 6e 63 65 20 72 65 |t mainte|nance re|
|00004ba0| 6c 65 61 73 65 20 6f 66 | 20 43 50 58 20 62 79 20 |lease of| CPX by |
|00004bb0| 50 49 2e 00 00 00 1b 77 | 00 24 00 4b c2 42 6f 74 |PI.....w|.$.K.Bot|
|00004bc0| 68 20 49 20 61 6e 64 20 | 74 68 65 20 50 49 20 54 |h I and |the PI T|
|00004bd0| 65 63 68 20 53 75 70 70 | 6f 72 74 20 73 74 61 66 |ech Supp|ort staf|
|00004be0| 66 20 77 65 72 65 20 73 | 75 72 70 72 69 73 65 64 |f were s|urprised|
|00004bf0| 20 74 68 61 74 20 73 75 | 63 68 20 61 20 62 75 67 | that su|ch a bug|
|00004c00| 20 61 73 20 74 68 65 00 | 00 00 1b 83 00 09 00 4d | as the.|.......M|
|00004c10| c2 70 72 65 6d 61 74 75 | 72 65 20 63 6f 6d 6d 61 |.prematu|re comma|
|00004c20| 6e 64 20 63 6f 6d 6d 69 | 74 6d 65 6e 74 20 64 69 |nd commi|tment di|
|00004c30| 73 63 75 73 73 65 64 20 | 61 62 6f 76 65 20 68 61 |scussed |above ha|
|00004c40| 64 20 67 6f 6e 65 20 75 | 6e 72 65 70 6f 72 74 65 |d gone u|nreporte|
|00004c50| 64 20 75 6e 74 69 6c 20 | 6e 6f 77 20 2d 00 00 00 |d until |now -...|
|00004c60| 1b 8f 00 09 00 58 c2 61 | 6c 6d 6f 73 74 20 61 20 |.....X.a|lmost a |
|00004c70| 79 65 61 72 20 73 69 6e | 63 65 20 43 50 58 ff d5 |year sin|ce CPX..|
|00004c80| 73 20 69 6e 69 74 69 61 | 6c 20 72 65 6c 65 61 73 |s initia|l releas|
|00004c90| 65 2e 20 20 54 68 65 20 | 6f 6e 6c 79 20 72 65 61 |e. The |only rea|
|00004ca0| 73 6f 6e 20 74 68 61 74 | 20 77 65 20 63 6f 75 6c |son that| we coul|
|00004cb0| 64 20 74 68 69 6e 6b 20 | 6f 66 20 66 6f 72 00 00 |d think |of for..|
|00004cc0| 1b 9b 00 09 00 55 c2 74 | 68 69 73 20 77 61 73 20 |.....U.t|his was |
|00004cd0| 74 68 61 74 20 43 50 58 | 20 70 72 6f 67 72 61 6d |that CPX| program|
|00004ce0| 6d 65 72 73 20 77 65 72 | 65 20 6e 6f 74 20 70 75 |mers wer|e not pu|
|00004cf0| 74 74 69 6e 67 20 75 6e | 64 6f 20 73 75 70 70 6f |tting un|do suppo|
|00004d00| 72 74 20 69 6e 74 6f 20 | 74 68 65 69 72 20 61 70 |rt into |their ap|
|00004d10| 70 6c 69 63 61 74 69 6f | 6e 73 2e 00 00 00 1b a7 |plicatio|ns......|
|00004d20| 00 09 00 56 c2 48 6f 70 | 65 66 75 6c 6c 79 20 74 |...V.Hop|efully t|
|00004d30| 68 69 73 20 73 65 63 74 | 69 6f 6e 20 49 20 68 61 |his sect|ion I ha|
|00004d40| 76 65 20 69 6d 70 6c 65 | 6d 65 6e 74 65 64 20 61 |ve imple|mented a|
|00004d50| 6e 64 20 74 68 69 73 20 | 61 72 74 69 63 6c 65 20 |nd this |article |
|00004d60| 77 69 6c 6c 20 65 6e 63 | 6f 75 72 61 67 65 20 67 |will enc|ourage g|
|00004d70| 72 65 61 74 65 72 20 75 | 73 65 00 00 1b b3 00 09 |reater u|se......|
|00004d80| 00 0a c2 6f 66 20 75 6e | 64 6f 2e 20 00 00 1b c4 |...of un|do. ....|
|00004d90| 00 24 00 4f c2 49 6e 20 | 61 64 64 69 74 69 6f 6e |.$.O.In |addition|
|00004da0| 2c 20 73 65 76 65 72 61 | 6c 20 6f 74 68 65 72 20 |, severa|l other |
|00004db0| 74 68 69 6e 67 73 20 77 | 65 72 65 20 68 61 72 64 |things w|ere hard|
|00004dc0| 65 72 20 74 68 61 6e 20 | 65 78 70 65 63 74 65 64 |er than |expected|
|00004dd0| 2e 20 20 48 61 76 69 6e | 67 20 61 20 76 69 73 69 |. Havin|g a visi|
|00004de0| 62 6c 65 00 00 00 1b d0 | 00 09 00 56 c2 69 6e 64 |ble.....|...V.ind|
|00004df0| 69 63 61 74 69 6f 6e 20 | 74 68 61 74 20 61 20 71 |ication |that a q|
|00004e00| 75 61 64 72 69 6c 61 74 | 65 72 61 6c 20 77 61 73 |uadrilat|eral was|
|00004e10| 20 73 65 6c 65 63 74 65 | 64 20 77 61 73 20 74 72 | selecte|d was tr|
|00004e20| 69 63 6b 79 2e 20 20 54 | 68 69 73 20 77 61 73 20 |icky. T|his was |
|00004e30| 6e 6f 74 20 62 65 63 61 | 75 73 65 20 69 74 20 77 |not beca|use it w|
|00004e40| 61 73 00 00 1b dc 00 09 | 00 55 c2 68 61 72 64 20 |as......|.U.hard |
|00004e50| 74 6f 20 58 4f 52 20 73 | 6d 61 6c 6c 20 73 71 75 |to XOR s|mall squ|
|00004e60| 61 72 65 73 20 61 74 20 | 74 68 65 20 76 65 72 74 |ares at |the vert|
|00004e70| 69 63 65 73 20 6f 66 20 | 74 68 65 20 71 75 61 64 |ices of |the quad|
|00004e80| 2c 20 62 75 74 20 72 61 | 74 68 65 72 20 62 65 63 |, but ra|ther bec|
|00004e90| 61 75 73 65 20 69 74 20 | 77 61 73 20 6e 6f 74 00 |ause it |was not.|
|00004ea0| 00 00 1b e8 00 09 00 57 | c2 65 61 73 79 20 74 6f |.......W|.easy to|
|00004eb0| 20 68 6f 6f 6b 20 69 6e | 74 6f 20 74 68 65 20 43 | hook in|to the C|
|00004ec0| 50 58 20 64 72 61 77 69 | 6e 67 20 63 6f 64 65 20 |PX drawi|ng code |
|00004ed0| 69 6e 20 74 68 65 20 63 | 6f 72 72 65 63 74 20 77 |in the c|orrect w|
|00004ee0| 61 79 2e 20 20 4f 76 65 | 72 72 69 64 69 6e 67 20 |ay. Ove|rriding |
|00004ef0| 74 68 65 20 76 69 65 77 | 20 6f 72 20 74 68 65 00 |the view| or the.|
|00004f00| 00 00 1b f4 00 09 00 57 | c2 77 69 6e 64 6f 77 ff |.......W|.window.|
|00004f10| d5 73 20 44 72 61 77 20 | 6d 65 74 68 6f 64 20 77 |.s Draw |method w|
|00004f20| 6f 72 6b 65 64 20 63 6f | 72 72 65 63 74 6c 79 20 |orked co|rrectly |
|00004f30| 66 6f 72 20 74 68 65 20 | 69 6e 69 74 69 61 6c 20 |for the |initial |
|00004f40| 64 72 61 77 20 6f 66 20 | 74 68 65 20 77 69 6e 64 |draw of |the wind|
|00004f50| 6f 77 2c 20 62 75 74 20 | 64 69 64 6e ff d5 74 00 |ow, but |didn..t.|
|00004f60| 00 00 1c 00 00 09 00 52 | c2 77 6f 72 6b 20 66 6f |.......R|.work fo|
|00004f70| 72 20 72 65 64 72 61 77 | 73 2e 20 20 54 68 65 20 |r redraw|s. The |
|00004f80| 73 6f 6c 75 74 69 6f 6e | 20 49 20 65 6e 64 65 64 |solution| I ended|
|00004f90| 20 75 70 20 75 73 69 6e | 67 20 77 61 73 20 74 6f | up usin|g was to|
|00004fa0| 20 61 64 64 20 63 6f 64 | 65 20 74 6f 20 74 68 65 | add cod|e to the|
|00004fb0| 20 51 75 61 64 2f 44 72 | 61 77 00 00 1c 0c 00 09 | Quad/Dr|aw......|
|00004fc0| 00 58 c2 6d 65 74 68 6f | 64 2e 20 20 53 69 6e 63 |.X.metho|d. Sinc|
|00004fd0| 65 20 61 20 71 75 61 64 | 20 73 74 6f 72 65 73 20 |e a quad| stores |
|00004fe0| 69 74 73 20 6f 77 6e 20 | 73 65 6c 65 63 74 69 6f |its own |selectio|
|00004ff0| 6e 20 73 74 61 74 65 2c | 20 74 68 69 73 20 77 61 |n state,| this wa|
|00005000| 73 20 65 61 73 79 2c 20 | 61 6e 64 20 6e 6f 74 20 |s easy, |and not |
|00005010| 74 6f 6f 20 75 67 6c 79 | 20 61 00 00 1c 18 00 09 |too ugly| a......|
|00005020| 00 08 c2 64 65 73 69 67 | 6e 2e 00 00 1c 29 00 24 |...desig|n....).$|
|00005030| 00 51 c2 49 6d 70 6c 65 | 6d 65 6e 74 69 6e 67 20 |.Q.Imple|menting |
|00005040| 74 68 65 20 63 6f 6c 6f | 72 20 63 68 61 6e 67 69 |the colo|r changi|
|00005050| 6e 67 20 77 61 73 20 61 | 20 6c 69 74 74 6c 65 20 |ng was a| little |
|00005060| 6d 6f 72 65 20 64 69 66 | 66 69 63 75 6c 74 20 74 |more dif|ficult t|
|00005070| 68 61 6e 20 6e 65 63 65 | 73 73 61 72 79 20 73 69 |han nece|ssary si|
|00005080| 6e 63 65 00 00 00 1c 35 | 00 09 00 55 c2 74 68 65 |nce....5|...U.the|
|00005090| 72 65 20 77 61 73 20 6e | 6f 20 61 62 73 74 72 61 |re was n|o abstra|
|000050a0| 63 74 20 73 75 70 65 72 | 63 6c 61 73 73 20 66 6f |ct super|class fo|
|000050b0| 72 20 63 6f 6d 6d 61 6e | 64 73 20 69 6e 69 74 69 |r comman|ds initi|
|000050c0| 61 74 65 64 20 77 69 74 | 68 20 74 68 65 20 6d 6f |ated wit|h the mo|
|000050d0| 75 73 65 20 72 61 74 68 | 65 72 20 74 68 61 6e 20 |use rath|er than |
|000050e0| 61 00 00 00 1c 41 00 09 | 00 51 c2 6d 65 6e 75 20 |a....A..|.Q.menu |
|000050f0| 69 74 65 6d 2e 20 20 57 | 68 61 74 20 49 20 77 61 |item. W|hat I wa|
|00005100| 6e 74 65 64 20 77 61 73 | 20 73 6f 6d 65 74 68 69 |nted was| somethi|
|00005110| 6e 67 20 6c 69 6b 65 20 | 74 68 65 20 4d 65 6e 75 |ng like |the Menu|
|00005120| 20 42 65 68 61 76 69 6f | 72 20 63 6c 61 73 73 2e | Behavio|r class.|
|00005130| 20 20 49 20 61 64 64 65 | 64 20 61 00 00 00 1c 4d | I adde|d a....M|
|00005140| 00 09 00 47 c2 4d 6f 75 | 73 65 20 42 65 68 61 76 |...G.Mou|se Behav|
|00005150| 69 6f 72 20 63 6c 61 73 | 73 20 61 6e 64 20 73 75 |ior clas|s and su|
|00005160| 62 63 6c 61 73 73 65 64 | 20 69 74 20 66 6f 72 20 |bclassed| it for |
|00005170| 74 68 65 20 52 65 63 6f | 6c 6f 72 20 51 75 61 64 |the Reco|lor Quad|
|00005180| 20 43 6d 64 20 63 6c 61 | 73 73 2e 00 00 00 1c 5e | Cmd cla|ss.....^|
|00005190| 00 24 00 50 c2 4f 76 65 | 72 61 6c 6c 20 74 68 65 |.$.P.Ove|rall the|
|000051a0| 20 69 6d 70 72 65 73 73 | 69 6f 6e 20 74 68 61 74 | impress|ion that|
|000051b0| 20 49 20 67 6f 74 20 77 | 61 73 20 74 68 61 74 20 | I got w|as that |
|000051c0| 77 68 69 6c 65 20 69 74 | 20 77 61 73 20 6e 6f 74 |while it| was not|
|000051d0| 20 74 6f 6f 20 64 69 66 | 66 69 63 75 6c 74 20 74 | too dif|ficult t|
|000051e0| 6f 20 64 6f 00 00 1c 6a | 00 09 00 4e c2 4d 61 63 |o do...j|...N.Mac|
|000051f0| 44 72 61 77 2d 6c 69 6b | 65 20 75 73 65 72 20 69 |Draw-lik|e user i|
|00005200| 6e 74 65 72 66 61 63 65 | 73 20 69 6e 20 43 50 58 |nterface|s in CPX|
|00005210| 2c 20 74 68 69 73 20 77 | 61 73 20 6e 6f 74 20 74 |, this w|as not t|
|00005220| 68 65 20 64 65 73 69 67 | 6e 20 63 65 6e 74 65 72 |he desig|n center|
|00005230| 20 66 6f 72 20 43 50 58 | 2e 20 00 00 1c 76 00 09 | for CPX|. ...v..|
|00005240| 00 52 c2 28 50 72 6f 62 | 61 62 6c 79 20 69 6d 70 |.R.(Prob|ably imp|
|00005250| 6c 65 6d 65 6e 74 69 6e | 67 20 64 61 74 61 62 61 |lementin|g databa|
|00005260| 73 65 20 66 72 6f 6e 74 | 20 65 6e 64 73 20 77 61 |se front| ends wa|
|00005270| 73 2e 29 20 20 48 6f 77 | 65 76 65 72 2c 20 65 76 |s.) How|ever, ev|
|00005280| 65 72 79 74 68 69 6e 67 | 20 77 61 73 20 64 6f 61 |erything| was doa|
|00005290| 62 6c 65 2e 00 00 1c 8c | 00 bd 00 0b c4 52 65 66 |ble.....|.....Ref|
|000052a0| 65 72 65 6e 63 65 73 00 | 00 00 1c a2 00 24 00 4e |erences.|.....$.N|
|000052b0| c2 5b 31 5d 20 53 63 68 | 6d 75 63 6b 65 72 2c 20 |.[1] Sch|mucker, |
|000052c0| 4b 75 72 74 2e 20 20 c6 | 4f 62 6a 65 63 74 20 4f |Kurt. .|Object O|
|000052d0| 72 69 65 6e 74 65 64 20 | 50 72 6f 67 72 61 6d 6d |riented |Programm|
|000052e0| 69 6e 67 20 66 6f 72 20 | 74 68 65 20 4d 61 63 69 |ing for |the Maci|
|000052f0| 6e 74 6f 73 68 c2 2c 20 | 48 61 79 64 65 6e 00 00 |ntosh., |Hayden..|
|00005300| 1c ae 00 09 00 14 c2 42 | 6f 6f 6b 20 43 6f 6d 70 |.......B|ook Comp|
|00005310| 61 6e 79 2c 20 31 39 38 | 36 2e 00 00 1c bf 00 24 |any, 198|6......$|
|00005320| 00 4f c2 5b 32 5d 20 41 | 72 74 6d 61 6e 2c 20 47 |.O.[2] A|rtman, G|
|00005330| 65 72 61 6c 64 2e 20 20 | ff d2 4d 6f 72 65 20 6f |erald. |..More o|
|00005340| 6e 20 53 74 79 6c 65 20 | 69 6e 20 50 72 6f 67 72 |n Style |in Progr|
|00005350| 61 70 68 2c ff d3 20 c6 | 56 69 73 75 61 6c 20 4e |aph,.. .|Visual N|
|00005360| 65 77 73 c2 2c 20 41 70 | 72 69 6c 20 31 39 39 34 |ews., Ap|ril 1994|
|00005370| 2c 00 00 00 1c cb 00 09 | 00 0b c2 70 70 2e 20 31 |,.......|...pp. 1|
|00005380| 34 2d 31 35 2e 00 00 00 | 1c dc 00 24 00 4d c2 5b |4-15....|...$.M.[|
|00005390| 33 5d 20 53 63 68 6d 75 | 63 6b 65 72 2c 20 4b 75 |3] Schmu|cker, Ku|
|000053a0| 72 74 2e 20 20 ff d2 54 | 6f 77 61 72 64 20 61 20 |rt. ..T|oward a |
|000053b0| 50 72 6f 67 72 61 70 68 | 20 43 6f 64 69 6e 67 20 |Prograph| Coding |
|000053c0| 53 74 79 6c 65 2c ff d3 | 20 c6 56 69 73 75 61 6c |Style,..| .Visual|
|000053d0| 20 4e 65 77 73 c2 2c 20 | 4d 61 79 00 00 00 1c e8 | News., |May.....|
|000053e0| 00 09 00 11 c2 31 39 39 | 34 2c 20 70 70 2e 20 31 |.....199|4, pp. 1|
|000053f0| 36 2d 31 37 2e 00 44 52 | 00 00 00 00 0b 00 0e 10 |6-17..DR|........|
|00005400| 46 65 62 20 39 35 20 43 | 68 61 6c 6c 65 6e 67 65 |Feb 95 C|hallenge|
|00005410| 00 1d 10 4d 61 72 20 39 | 35 20 43 68 61 6c 6c 65 |...Mar 9|5 Challe|
|00005420| 6e 67 65 00 26 10 41 70 | 72 20 39 35 20 43 68 61 |nge.&.Ap|r 95 Cha|
|00005430| 6c 6c 65 6e 67 65 00 36 | 10 4d 61 79 20 39 35 20 |llenge.6|.May 95 |
|00005440| 43 68 61 6c 6c 65 6e 67 | 65 00 41 10 4a 75 6e 20 |Challeng|e.A.Jun |
|00005450| 39 35 20 43 68 61 6c 6c | 65 6e 67 65 00 4d 10 4a |95 Chall|enge.M.J|
|00005460| 75 6c 20 39 35 20 43 68 | 61 6c 6c 65 6e 67 65 00 |ul 95 Ch|allenge.|
|00005470| 57 10 41 75 67 20 39 35 | 20 43 68 61 6c 6c 65 6e |W.Aug 95| Challen|
|00005480| 67 65 00 68 10 53 65 70 | 20 39 35 20 43 68 61 6c |ge.h.Sep| 95 Chal|
|00005490| 6c 65 6e 67 65 00 73 10 | 4f 63 74 20 39 35 20 43 |lenge.s.|Oct 95 C|
|000054a0| 68 61 6c 6c 65 6e 67 65 | 00 7d 10 4e 6f 76 20 39 |hallenge|.}.Nov 9|
|000054b0| 35 20 43 68 61 6c 6c 65 | 6e 67 65 00 87 10 44 65 |5 Challe|nge...De|
|000054c0| 63 20 39 35 20 43 68 61 | 6c 6c 65 6e 67 65 10 4a |c 95 Cha|llenge.J|
|000054d0| 61 6e 20 39 35 20 43 68 | 61 6c 6c 65 6e 67 65 00 |an 95 Ch|allenge.|
|000054e0| 02 7e 00 00 00 0c 00 09 | 00 12 c4 56 6f 6c 75 6d |.~......|...Volum|
|000054f0| 65 20 4e 75 6d 62 65 72 | 3a 97 31 31 00 00 00 18 |e Number|:.11....|
|00005500| 00 09 00 10 c4 49 73 73 | 75 65 20 4e 75 6d 62 65 |.....Iss|ue Numbe|
|00005510| 72 3a a2 31 00 00 00 24 | 00 09 00 24 c4 43 6f 6c |r:.1...$|...$.Col|
|00005520| 75 6d 6e 20 54 61 67 3a | b0 50 72 6f 67 72 61 6d |umn Tag:|.Program|
|00005530| 6d 65 72 ff d5 73 20 43 | 68 61 6c 6c 65 6e 67 65 |mer..s C|hallenge|
|00005540| 00 00 00 96 00 09 00 1f | c5 50 72 6f 67 72 61 6d |........|.Program|
|00005550| 6d 65 72 ff d5 73 20 43 | 68 61 6c 6c 65 6e 67 65 |mer..s C|hallenge|
|00005560| bd c4 f0 00 8b 00 9a 00 | 00 00 00 a9 00 09 00 23 |........|.......#|
|00005570| c6 42 79 20 4d 69 6b 65 | 20 53 63 61 6e 6c 69 6e |.By Mike| Scanlin|
|00005580| 2c 20 4d 6f 75 6e 74 61 | 69 6e 20 56 69 65 77 2c |, Mounta|in View,|
|00005590| 20 43 41 00 00 00 00 cc | 00 09 00 55 c6 f0 00 8c | CA.....|...U....|
|000055a0| 00 12 20 4e 6f 74 65 3a | 20 20 53 6f 75 72 63 65 |.. Note:| Source|
|000055b0| 20 63 6f 64 65 20 66 69 | 6c 65 73 20 61 63 63 6f | code fi|les acco|
|000055c0| 6d 70 61 6e 79 69 6e 67 | 20 61 72 74 69 63 6c 65 |mpanying| article|
|000055d0| 20 61 72 65 20 6c 6f 63 | 61 74 65 64 20 6f 6e 20 | are loc|ated on |
|000055e0| 4d 61 63 54 65 63 68 20 | 43 44 2d 52 4f 4d 20 6f |MacTech |CD-ROM o|
|000055f0| 72 00 00 00 00 d8 00 09 | 00 13 c6 73 6f 75 72 63 |r.......|...sourc|
|00005600| 65 20 63 6f 64 65 20 64 | 69 73 6b 73 2e 00 00 00 |e code d|isks....|
|00005610| 00 f1 00 9e 00 15 c4 50 | 6f 6b 65 72 20 48 61 6e |.......P|oker Han|
|00005620| 64 20 45 76 61 6c 75 61 | 74 6f 72 00 00 00 01 07 |d Evalua|tor.....|
|00005630| 00 09 00 52 c2 54 68 69 | 73 20 6d 6f 6e 74 68 ff |...R.Thi|s month.|
|00005640| d5 73 20 63 68 61 6c 6c | 65 6e 67 65 20 77 61 73 |.s chall|enge was|
|00005650| 20 73 75 67 67 65 73 74 | 65 64 20 62 79 20 c4 43 | suggest|ed by .C|
|00005660| 68 72 69 73 20 44 65 72 | 6f 73 73 69 20 c2 28 4d |hris Der|ossi .(M|
|00005670| 6f 75 6e 74 61 69 6e 20 | 56 69 65 77 2c 20 43 41 |ountain |View, CA|
|00005680| 29 2e 20 54 68 65 00 00 | 01 13 00 09 00 57 c2 67 |). The..|.....W.g|
|00005690| 6f 61 6c 20 69 73 20 74 | 6f 20 63 6f 6d 70 61 72 |oal is t|o compar|
|000056a0| 65 20 74 77 6f 20 70 6f | 6b 65 72 20 68 61 6e 64 |e two po|ker hand|
|000056b0| 73 20 61 6e 64 20 64 65 | 74 65 72 6d 69 6e 65 20 |s and de|termine |
|000056c0| 77 68 69 63 68 20 69 73 | 20 68 69 67 68 65 72 2e |which is| higher.|
|000056d0| 20 59 6f 75 72 20 72 6f | 75 74 69 6e 65 20 77 69 | Your ro|utine wi|
|000056e0| 6c 6c 20 62 65 00 00 00 | 01 1f 00 09 00 57 c2 67 |ll be...|.....W.g|
|000056f0| 69 76 65 6e 20 74 77 6f | 20 68 61 6e 64 73 20 6f |iven two| hands o|
|00005700| 66 20 37 20 63 61 72 64 | 73 20 65 61 63 68 2e 20 |f 7 card|s each. |
|00005710| 49 74 20 77 69 6c 6c 20 | 68 61 76 65 20 74 6f 20 |It will |have to |
|00005720| 6d 61 6b 65 20 74 68 65 | 20 62 65 73 74 20 35 20 |make the| best 5 |
|00005730| 63 61 72 64 20 68 61 6e | 64 20 69 74 20 63 61 6e |card han|d it can|
|00005740| 20 66 72 6f 6d 00 00 00 | 01 2b 00 09 00 41 c2 65 | from...|.+...A.e|
|00005750| 61 63 68 20 61 6e 64 20 | 72 65 74 75 72 6e 20 74 |ach and |return t|
|00005760| 68 65 20 74 77 6f 20 35 | 2d 63 61 72 64 20 68 61 |he two 5|-card ha|
|00005770| 6e 64 73 20 61 73 20 77 | 65 6c 6c 20 61 73 20 77 |nds as w|ell as w|
|00005780| 68 69 63 68 20 69 73 20 | 68 69 67 68 65 72 2e 00 |hich is |higher..|
|00005790| 00 00 01 3c 00 24 00 51 | c2 48 65 72 65 20 69 73 |...<.$.Q|.Here is|
|000057a0| 20 68 6f 77 20 70 6f 6b | 65 72 20 68 61 6e 64 73 | how pok|er hands|
|000057b0| 20 72 61 6e 6b 20 28 66 | 72 6f 6d 20 6c 6f 77 65 | rank (f|rom lowe|
|000057c0| 73 74 20 74 6f 20 68 69 | 67 68 65 73 74 2c 20 77 |st to hi|ghest, w|
|000057d0| 69 74 68 20 61 6e 20 65 | 78 61 6d 70 6c 65 20 6f |ith an e|xample o|
|000057e0| 66 20 65 61 63 68 20 69 | 6e 00 00 00 01 48 00 09 |f each i|n....H..|
|000057f0| 00 0e c2 70 61 72 65 6e | 74 68 65 73 65 73 29 3a |...paren|theses):|
|00005800| 00 00 01 54 00 09 00 01 | c2 00 00 00 01 7b 00 48 |...T....|.....{.H|
|00005810| 00 19 c2 6f 6e 65 20 70 | 61 69 72 20 28 35 2c 20 |...one p|air (5, |
|00005820| 35 2c 20 2a 2c 20 2a 2c | 20 2a 29 00 00 00 01 8c |5, *, *,| *).....|
|00005830| 00 48 00 19 c2 74 77 6f | 20 70 61 69 72 20 28 35 |.H...two| pair (5|
|00005840| 2c 20 35 2c 20 38 2c 20 | 38 2c 20 2a 29 00 00 00 |, 5, 8, |8, *)...|
|00005850| 01 9d 00 48 00 20 c2 74 | 68 72 65 65 20 6f 66 20 |...H. .t|hree of |
|00005860| 61 20 6b 69 6e 64 20 28 | 35 2c 20 35 2c 20 35 2c |a kind (|5, 5, 5,|
|00005870| 20 2a 2c 20 2a 29 00 00 | 01 ae 00 48 00 19 c2 73 | *, *)..|...H...s|
|00005880| 74 72 61 69 67 68 74 20 | 28 35 2c 20 36 2c 20 37 |traight |(5, 6, 7|
|00005890| 2c 20 38 2c 20 39 29 00 | 00 00 01 bf 00 48 00 25 |, 8, 9).|.....H.%|
|000058a0| c2 66 6c 75 73 68 20 28 | 63 6c 75 62 2c 20 63 6c |.flush (|club, cl|
|000058b0| 75 62 2c 20 63 6c 75 62 | 2c 20 63 6c 75 62 2c 20 |ub, club|, club, |
|000058c0| 63 6c 75 62 29 00 00 00 | 01 d0 00 48 00 1b c2 66 |club)...|...H...f|
|000058d0| 75 6c 6c 20 68 6f 75 73 | 65 20 28 35 2c 20 35 2c |ull hous|e (5, 5,|
|000058e0| 20 35 2c 20 38 2c 20 38 | 29 00 00 00 01 e1 00 48 | 5, 8, 8|)......H|
|000058f0| 00 1f c2 66 6f 75 72 20 | 6f 66 20 61 20 6b 69 6e |...four |of a kin|
|00005900| 64 20 28 35 2c 20 35 2c | 20 35 2c 20 35 2c 20 2a |d (5, 5,| 5, 5, *|
|00005910| 29 00 00 00 01 f2 00 48 | 00 2a c2 73 74 72 61 69 |)......H|.*.strai|
|00005920| 67 68 74 20 66 6c 75 73 | 68 20 28 35 2c 20 36 2c |ght flus|h (5, 6,|
|00005930| 20 37 2c 20 38 2c 20 39 | 3b 20 61 6c 6c 20 63 6c | 7, 8, 9|; all cl|
|00005940| 75 62 73 29 00 00 02 03 | 00 48 00 26 c2 66 69 76 |ubs)....|.H.&.fiv|
|00005950| 65 20 6f 66 20 61 20 6b | 69 6e 64 20 28 35 2c 20 |e of a k|ind (5, |
|00005960| 35 2c 20 35 2c 20 35 2c | 20 77 69 6c 64 43 61 72 |5, 5, 5,| wildCar|
|00005970| 64 29 00 00 02 0f 00 09 | 00 01 c2 00 00 00 02 36 |d)......|.......6|
|00005980| 00 24 00 2c c2 54 68 65 | 20 70 72 6f 74 6f 74 79 |.$.,.The| prototy|
|00005990| 70 65 20 6f 66 20 74 68 | 65 20 66 75 6e 63 74 69 |pe of th|e functi|
|000059a0| 6f 6e 20 79 6f 75 20 77 | 72 69 74 65 20 69 73 3a |on you w|rite is:|
|000059b0| 00 00 02 4c 00 12 00 1c | c7 74 79 70 65 64 65 66 |...L....|.typedef|
|000059c0| 20 75 6e 73 69 67 6e 65 | 64 20 63 68 61 72 20 43 | unsigne|d char C|
|000059d0| 61 72 64 3b 00 00 02 57 | 00 12 00 01 c7 00 00 00 |ard;...W|........|
|000059e0| 02 6d 00 12 00 18 c7 74 | 79 70 65 64 65 66 20 53 |.m.....t|ypedef S|
|000059f0| 65 76 65 6e 43 61 72 64 | 48 61 6e 64 20 7b 00 00 |evenCard|Hand {..|
|00005a00| 02 78 00 1b 00 0f c7 43 | 61 72 64 83 63 61 72 64 |.x.....C|ard.card|
|00005a10| 73 5b 37 5d 3b 00 00 00 | 02 83 00 12 00 11 c7 7d |s[7];...|.......}|
|00005a20| 20 53 65 76 65 6e 43 61 | 72 64 48 61 6e 64 3b 00 | SevenCa|rdHand;.|
|00005a30| 00 00 02 8e 00 12 00 01 | c7 00 00 00 02 a4 00 12 |........|........|
|00005a40| 00 17 c7 74 79 70 65 64 | 65 66 20 46 69 76 65 43 |...typed|ef FiveC|
|00005a50| 61 72 64 48 61 6e 64 20 | 7b 00 00 00 02 af 00 1b |ardHand |{.......|
|00005a60| 00 0f c7 43 61 72 64 83 | 63 61 72 64 73 5b 35 5d |...Card.|cards[5]|
|00005a70| 3b 00 00 00 02 ba 00 12 | 00 10 c7 7d 20 46 69 76 |;.......|...} Fiv|
|00005a80| 65 43 61 72 64 48 61 6e | 64 3b 00 00 02 c5 00 12 |eCardHan|d;......|
|00005a90| 00 01 c7 00 00 00 02 db | 00 12 00 06 c7 73 68 6f |........|.....sho|
|00005aa0| 72 74 00 00 02 e6 00 12 | 00 26 c7 43 6f 6d 70 61 |rt......|.&.Compa|
|00005ab0| 72 65 50 6f 6b 65 72 48 | 61 6e 64 73 28 68 61 6e |rePokerH|ands(han|
|00005ac0| 64 31 50 74 72 2c 20 68 | 61 6e 64 32 50 74 72 2c |d1Ptr, h|and2Ptr,|
|00005ad0| 00 00 02 f1 00 1b 00 14 | c7 62 65 73 74 31 50 74 |........|.best1Pt|
|00005ae0| 72 2c 20 62 65 73 74 32 | 50 74 72 2c 00 00 02 fc |r, best2|Ptr,....|
|00005af0| 00 1b 00 1b c7 77 69 6c | 64 43 61 72 64 41 6c 6c |.....wil|dCardAll|
|00005b00| 6f 77 65 64 2c 20 77 69 | 6c 64 43 61 72 64 2c 00 |owed, wi|ldCard,.|
|00005b10| 00 00 03 07 00 1b 00 1a | c7 73 74 72 61 69 67 68 |........|.straigh|
|00005b20| 74 73 41 6e 64 46 6c 75 | 73 68 65 73 56 61 6c 69 |tsAndFlu|shesVali|
|00005b30| 64 2c 00 00 03 12 00 1b | 00 10 c7 70 72 69 76 61 |d,......|...priva|
|00005b40| 74 65 44 61 74 61 50 74 | 72 29 00 00 03 1d 00 12 |teDataPt|r)......|
|00005b50| 00 19 c7 53 65 76 65 6e | 43 61 72 64 48 61 6e 64 |...Seven|CardHand|
|00005b60| 8c 2a 68 61 6e 64 31 50 | 74 72 3b 00 00 00 03 28 |.*hand1P|tr;....(|
|00005b70| 00 12 00 19 c7 53 65 76 | 65 6e 43 61 72 64 48 61 |.....Sev|enCardHa|
|00005b80| 6e 64 8c 2a 68 61 6e 64 | 32 50 74 72 3b 00 00 00 |nd.*hand|2Ptr;...|
|00005b90| 03 33 00 12 00 18 c7 46 | 69 76 65 43 61 72 64 48 |.3.....F|iveCardH|
|00005ba0| 61 6e 64 84 2a 62 65 73 | 74 31 50 74 72 3b 00 00 |and.*bes|t1Ptr;..|
|00005bb0| 03 3e 00 12 00 18 c7 46 | 69 76 65 43 61 72 64 48 |.>.....F|iveCardH|
|00005bc0| 61 6e 64 84 2a 62 65 73 | 74 32 50 74 72 3b 00 00 |and.*bes|t2Ptr;..|
|00005bd0| 03 49 00 12 00 1a c7 42 | 6f 6f 6c 65 61 6e a2 20 |.I.....B|oolean. |
|00005be0| 77 69 6c 64 43 61 72 64 | 41 6c 6c 6f 77 65 64 3b |wildCard|Allowed;|
|00005bf0| 00 00 03 54 00 12 00 12 | c7 43 61 72 64 80 00 6c |...T....|.Card..l|
|00005c00| 20 77 69 6c 64 43 61 72 | 64 3b 00 00 03 5f 00 12 | wildCar|d;..._..|
|00005c10| 00 23 c7 42 6f 6f 6c 65 | 61 6e a2 20 73 74 72 61 |.#.Boole|an. stra|
|00005c20| 69 67 68 74 73 41 6e 64 | 46 6c 75 73 68 65 73 56 |ightsAnd|FlushesV|
|00005c30| 61 6c 69 64 3b 00 00 00 | 03 6a 00 12 00 18 c7 76 |alid;...|.j.....v|
|00005c40| 6f 69 64 80 00 6c 2a 70 | 72 69 76 61 74 65 44 61 |oid..l*p|rivateDa|
|00005c50| 74 61 50 74 72 3b 00 00 | 03 75 00 12 00 01 c7 00 |taPtr;..|.u......|
|00005c60| 00 00 03 91 00 24 00 50 | c2 41 20 43 61 72 64 20 |.....$.P|.A Card |
|00005c70| 69 73 20 61 20 62 79 74 | 65 20 76 61 6c 75 65 20 |is a byt|e value |
|00005c80| 28 75 6e 73 69 67 6e 65 | 64 20 63 68 61 72 29 20 |(unsigne|d char) |
|00005c90| 66 72 6f 6d 20 30 20 74 | 6f 20 35 31 20 77 68 65 |from 0 t|o 51 whe|
|00005ca0| 72 65 20 30 20 72 65 70 | 72 65 73 65 6e 74 73 20 |re 0 rep|resents |
|00005cb0| 74 68 65 20 32 20 6f 66 | 00 00 03 9d 00 09 00 5a |the 2 of|.......Z|
|00005cc0| c2 63 6c 75 62 73 2c 20 | 39 20 69 73 20 74 68 65 |.clubs, |9 is the|
|00005cd0| 20 6a 61 63 6b 20 6f 66 | 20 63 6c 75 62 73 2c 20 | jack of| clubs, |
|00005ce0| 31 32 20 69 73 20 74 68 | 65 20 61 63 65 20 6f 66 |12 is th|e ace of|
|00005cf0| 20 63 6c 75 62 73 2c 20 | 31 33 20 69 73 20 74 68 | clubs, |13 is th|
|00005d00| 65 20 32 20 6f 66 20 64 | 69 61 6d 6f 6e 64 73 2c |e 2 of d|iamonds,|
|00005d10| 20 32 36 20 69 73 20 74 | 68 65 00 00 03 a9 00 09 | 26 is t|he......|
|00005d20| 00 40 c2 32 20 6f 66 20 | 68 65 61 72 74 73 2c 20 |.@.2 of |hearts, |
|00005d30| 33 39 20 69 73 20 74 68 | 65 20 32 20 6f 66 20 73 |39 is th|e 2 of s|
|00005d40| 70 61 64 65 73 20 61 6e | 64 20 35 31 20 69 73 20 |pades an|d 51 is |
|00005d50| 74 68 65 20 61 63 65 20 | 6f 66 20 73 70 61 64 65 |the ace |of spade|
|00005d60| 73 2e 00 00 03 ba 00 24 | 00 50 c2 54 68 65 20 69 |s......$|.P.The i|
|00005d70| 6e 70 75 74 73 20 61 72 | 65 20 74 77 6f 20 53 65 |nputs ar|e two Se|
|00005d80| 76 65 6e 43 61 72 64 48 | 61 6e 64 73 20 28 66 72 |venCardH|ands (fr|
|00005d90| 6f 6d 20 74 68 65 20 73 | 61 6d 65 20 64 65 63 6b |om the s|ame deck|
|00005da0| 3b 20 79 6f 75 20 77 6f | 6e ff d5 74 20 67 65 74 |; you wo|n..t get|
|00005db0| 20 64 75 70 6c 69 63 61 | 74 65 00 00 03 c6 00 09 | duplica|te......|
|00005dc0| 00 55 c2 43 61 72 64 73 | 29 2e 20 59 6f 75 72 20 |.U.Cards|). Your |
|00005dd0| 72 6f 75 74 69 6e 65 20 | 73 68 6f 75 6c 64 20 6d |routine |should m|
|00005de0| 61 6b 65 20 74 68 65 20 | 68 69 67 68 65 73 74 20 |ake the |highest |
|00005df0| 68 61 6e 64 20 70 6f 73 | 73 69 62 6c 65 20 77 69 |hand pos|sible wi|
|00005e00| 74 68 20 35 20 6f 66 20 | 74 68 65 20 37 20 63 61 |th 5 of |the 7 ca|
|00005e10| 72 64 73 20 61 6e 64 00 | 00 00 03 d2 00 09 00 54 |rds and.|.......T|
|00005e20| c2 73 74 6f 72 65 20 74 | 68 65 20 72 65 73 75 6c |.store t|he resul|
|00005e30| 74 69 6e 67 20 68 61 6e | 64 20 69 6e 20 74 68 65 |ting han|d in the|
|00005e40| 20 74 77 6f 20 46 69 76 | 65 43 61 72 64 48 61 6e | two Fiv|eCardHan|
|00005e50| 64 73 2e 20 49 74 20 73 | 68 6f 75 6c 64 20 74 68 |ds. It s|hould th|
|00005e60| 65 6e 20 72 65 74 75 72 | 6e 20 6f 6e 65 20 6f 66 |en retur|n one of|
|00005e70| 20 74 68 65 00 00 03 de | 00 09 00 57 c2 66 6f 6c | the....|...W.fol|
|00005e80| 6c 6f 77 69 6e 67 20 76 | 61 6c 75 65 73 3a 20 2d |lowing v|alues: -|
|00005e90| 31 20 69 66 20 68 61 6e | 64 20 31 20 69 73 20 68 |1 if han|d 1 is h|
|00005ea0| 69 67 68 65 72 20 74 68 | 61 6e 20 68 61 6e 64 20 |igher th|an hand |
|00005eb0| 32 2c 20 30 20 69 66 20 | 74 68 65 20 68 61 6e 64 |2, 0 if |the hand|
|00005ec0| 73 20 61 72 65 20 74 69 | 65 64 20 61 6e 64 20 31 |s are ti|ed and 1|
|00005ed0| 20 69 66 00 00 00 03 ea | 00 09 00 55 c2 68 61 6e | if.....|...U.han|
|00005ee0| 64 20 32 20 69 73 20 68 | 69 67 68 65 72 20 74 68 |d 2 is h|igher th|
|00005ef0| 61 6e 20 68 61 6e 64 20 | 31 2e 20 48 61 6e 64 73 |an hand |1. Hands|
|00005f00| 20 63 61 6e 20 62 65 20 | 74 69 65 64 20 62 65 63 | can be |tied bec|
|00005f10| 61 75 73 65 20 73 75 69 | 74 20 63 6f 75 6e 74 73 |ause sui|t counts|
|00005f20| 20 66 6f 72 20 6e 6f 74 | 68 69 6e 67 20 77 68 65 | for not|hing whe|
|00005f30| 6e 00 00 00 03 f6 00 09 | 00 54 c2 72 61 6e 6b 69 |n.......|.T.ranki|
|00005f40| 6e 67 20 68 61 6e 64 73 | 2e 20 41 63 65 73 20 63 |ng hands|. Aces c|
|00005f50| 61 6e 20 62 65 20 68 69 | 67 68 20 6f 72 20 6c 6f |an be hi|gh or lo|
|00005f60| 77 20 28 77 68 69 63 68 | 65 76 65 72 20 6d 61 6b |w (which|ever mak|
|00005f70| 65 73 20 74 68 65 20 72 | 65 73 75 6c 74 69 6e 67 |es the r|esulting|
|00005f80| 20 68 61 6e 64 20 62 65 | 74 74 65 72 29 2e 00 00 | hand be|tter)...|
|00005f90| 04 07 00 24 00 50 c2 57 | 69 6c 64 43 61 72 64 41 |...$.P.W|ildCardA|
|00005fa0| 6c 6c 6f 77 65 64 20 69 | 73 20 74 72 75 65 20 69 |llowed i|s true i|
|00005fb0| 66 20 77 69 6c 64 20 63 | 61 72 64 73 20 61 72 65 |f wild c|ards are|
|00005fc0| 20 61 6c 6c 6f 77 65 64 | 20 61 6e 64 20 66 61 6c | allowed| and fal|
|00005fd0| 73 65 20 69 66 20 6e 6f | 74 2e 20 49 66 20 74 68 |se if no|t. If th|
|00005fe0| 65 79 20 61 72 65 00 00 | 04 13 00 09 00 5a c2 61 |ey are..|.....Z.a|
|00005ff0| 6c 6c 6f 77 65 64 20 74 | 68 65 6e 20 77 69 6c 64 |llowed t|hen wild|
|00006000| 43 61 72 64 20 77 69 6c | 6c 20 62 65 20 74 68 65 |Card wil|l be the|
|00006010| 20 63 61 72 64 20 74 68 | 61 74 20 69 73 20 77 69 | card th|at is wi|
|00006020| 6c 64 2c 20 66 72 6f 6d | 20 30 20 74 6f 20 31 32 |ld, from| 0 to 12|
|00006030| 2e 20 41 6c 6c 20 73 75 | 69 74 73 20 6f 66 20 74 |. All su|its of t|
|00006040| 68 61 74 20 63 61 72 65 | 00 00 04 1f 00 09 00 56 |hat care|.......V|
|00006050| c2 61 72 65 20 77 69 6c | 64 2e 20 46 6f 72 20 65 |.are wil|d. For e|
|00006060| 78 61 6d 70 6c 65 2c 20 | 69 66 20 77 69 6c 64 43 |xample, |if wildC|
|00006070| 61 72 64 20 69 73 20 34 | 20 74 68 65 6e 20 61 6c |ard is 4| then al|
|00006080| 6c 20 36 ff d5 73 20 61 | 72 65 20 77 69 6c 64 20 |l 6..s a|re wild |
|00006090| 28 43 61 72 64 20 76 61 | 6c 75 65 73 20 34 2c 20 |(Card va|lues 4, |
|000060a0| 31 37 2c 20 33 30 00 00 | 04 2b 00 09 00 09 c2 61 |17, 30..|.+.....a|
|000060b0| 6e 64 20 34 33 29 2e 00 | 00 00 04 3c 00 24 00 53 |nd 43)..|...<.$.S|
|000060c0| c2 53 74 72 61 69 67 68 | 74 73 41 6e 64 46 6c 75 |.Straigh|tsAndFlu|
|000060d0| 73 68 65 73 56 61 6c 69 | 64 20 69 73 20 74 72 75 |shesVali|d is tru|
|000060e0| 65 20 69 66 20 73 74 72 | 61 69 67 68 74 73 20 61 |e if str|aights a|
|000060f0| 6e 64 20 66 6c 75 73 68 | 65 73 20 61 72 65 20 74 |nd flush|es are t|
|00006100| 6f 20 62 65 20 63 6f 75 | 6e 74 65 64 20 69 6e 20 |o be cou|nted in |
|00006110| 74 68 65 00 00 00 04 48 | 00 09 00 5b c2 72 61 6e |the....H|...[.ran|
|00006120| 6b 69 6e 67 2e 20 49 66 | 20 69 74 20 69 73 20 66 |king. If| it is f|
|00006130| 61 6c 73 65 20 74 68 65 | 6e 20 73 74 72 61 69 67 |alse the|n straig|
|00006140| 68 74 73 20 61 6e 64 20 | 66 6c 75 73 68 65 73 20 |hts and |flushes |
|00006150| 64 6f 20 6e 6f 74 20 63 | 6f 75 6e 74 20 66 6f 72 |do not c|ount for|
|00006160| 20 61 6e 79 74 68 69 6e | 67 20 28 74 68 65 79 20 | anythin|g (they |
|00006170| 61 72 65 20 6c 6f 77 00 | 00 00 04 54 00 09 00 08 |are low.|...T....|
|00006180| c2 68 61 6e 64 73 29 2e | 00 00 04 65 00 24 00 4f |.hands).|...e.$.O|
|00006190| c2 50 72 69 76 61 74 65 | 44 61 74 61 50 74 72 20 |.Private|DataPtr |
|000061a0| 69 73 20 74 68 65 20 76 | 61 6c 75 65 20 72 65 74 |is the v|alue ret|
|000061b0| 75 72 6e 65 64 20 62 79 | 20 79 6f 75 72 20 49 6e |urned by| your In|
|000061c0| 69 74 20 72 6f 75 74 69 | 6e 65 2c 20 77 68 69 63 |it routi|ne, whic|
|000061d0| 68 20 69 73 20 6e 6f 74 | 20 74 69 6d 65 64 2c 00 |h is not| timed,.|
|000061e0| 00 00 04 71 00 09 00 14 | c2 77 68 6f 73 65 20 70 |...q....|.whose p|
|000061f0| 72 6f 74 6f 74 79 70 65 | 20 69 73 3a 00 00 04 87 |rototype| is:....|
|00006200| 00 12 00 07 c7 76 6f 69 | 64 20 2a 00 00 00 04 92 |.....voi|d *.....|
|00006210| 00 12 00 31 c7 43 6f 6d | 70 61 72 65 50 6f 6b 65 |...1.Com|parePoke|
|00006220| 72 48 61 6e 64 73 49 6e | 69 74 28 77 69 6c 64 43 |rHandsIn|it(wildC|
|00006230| 61 72 64 41 6c 6c 6f 77 | 65 64 2c 20 77 69 6c 64 |ardAllow|ed, wild|
|00006240| 43 61 72 64 2c 00 00 00 | 04 9d 00 79 00 1e c7 20 |Card,...|...y... |
|00006250| 20 20 20 73 74 72 61 69 | 67 68 74 73 41 6e 64 46 | strai|ghtsAndF|
|00006260| 6c 75 73 68 65 73 56 61 | 6c 69 64 29 00 00 04 a8 |lushesVa|lid)....|
|00006270| 00 12 00 19 c7 42 6f 6f | 6c 65 61 6e a2 77 69 6c |.....Boo|lean.wil|
|00006280| 64 43 61 72 64 41 6c 6c | 6f 77 65 64 3b 00 00 00 |dCardAll|owed;...|
|00006290| 04 b3 00 12 00 11 c7 43 | 61 72 64 80 00 6c 77 69 |.......C|ard..lwi|
|000062a0| 6c 64 43 61 72 64 3b 00 | 00 00 04 be 00 12 00 22 |ldCard;.|......."|
|000062b0| c7 42 6f 6f 6c 65 61 6e | a2 73 74 72 61 69 67 68 |.Boolean|.straigh|
|000062c0| 74 73 41 6e 64 46 6c 75 | 73 68 65 73 56 61 6c 69 |tsAndFlu|shesVali|
|000062d0| 64 3b 00 00 04 c9 00 12 | 00 01 c7 00 00 00 04 e5 |d;......|........|
|000062e0| 00 24 00 4f c2 59 6f 75 | 20 63 61 6e 20 61 6c 6c |.$.O.You| can all|
|000062f0| 6f 63 61 74 65 20 75 70 | 20 74 6f 20 31 4d 42 20 |ocate up| to 1MB |
|00006300| 6f 66 20 6d 65 6d 6f 72 | 79 20 69 6e 20 79 6f 75 |of memor|y in you|
|00006310| 72 20 49 6e 69 74 20 72 | 6f 75 74 69 6e 65 20 28 |r Init r|outine (|
|00006320| 69 6e 20 63 61 73 65 20 | 79 6f 75 20 77 61 6e 74 |in case |you want|
|00006330| 20 74 6f 00 00 00 04 f1 | 00 09 00 4c c2 67 65 6e | to.....|...L.gen|
|00006340| 65 72 61 74 65 20 73 6f | 6d 65 20 6c 6f 6f 6b 75 |erate so|me looku|
|00006350| 70 20 74 61 62 6c 65 73 | 29 2e 20 54 68 65 20 70 |p tables|). The p|
|00006360| 6f 69 6e 74 65 72 20 79 | 6f 75 20 72 65 74 75 72 |ointer y|ou retur|
|00006370| 6e 20 77 69 6c 6c 20 62 | 65 20 70 61 73 73 65 64 |n will b|e passed|
|00006380| 20 74 6f 20 79 6f 75 72 | 00 00 04 fd 00 09 00 1b | to your|........|
|00006390| c2 43 6f 6d 70 61 72 65 | 50 6f 6b 65 72 48 61 6e |.Compare|PokerHan|
|000063a0| 64 73 20 72 6f 75 74 69 | 6e 65 2e 00 00 00 05 0e |ds routi|ne......|
|000063b0| 00 24 00 2f c2 45 2d 6d | 61 69 6c 20 6d 65 20 69 |.$./.E-m|ail me i|
|000063c0| 66 20 79 6f 75 20 68 61 | 76 65 20 61 6e 79 20 71 |f you ha|ve any q|
|000063d0| 75 65 73 74 69 6f 6e 73 | 2e 20 48 61 76 65 20 66 |uestions|. Have f|
|000063e0| 75 6e 2e 00 00 00 05 24 | 00 98 00 16 c4 54 77 6f |un.....$|.....Two|
|000063f0| 20 4d 6f 6e 74 68 73 20 | 41 67 6f 20 57 69 6e 6e | Months |Ago Winn|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.